summaryrefslogtreecommitdiffstats
path: root/Wrappers/Matlab
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-08-05 15:56:52 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2018-08-05 15:58:49 +0100
commita490e0a75e810591f87c73e41965fad9187f6cd1 (patch)
tree68cd2f4bfe4e2ea5c9e31c6b2072f579fb929855 /Wrappers/Matlab
parent2a2eb0e083991753a8d9247b63fea8f37559a6d7 (diff)
downloadregularization-a490e0a75e810591f87c73e41965fad9187f6cd1.tar.gz
regularization-a490e0a75e810591f87c73e41965fad9187f6cd1.tar.bz2
regularization-a490e0a75e810591f87c73e41965fad9187f6cd1.tar.xz
regularization-a490e0a75e810591f87c73e41965fad9187f6cd1.zip
added BUILD_PYTHON_WRAPPERS BUILD_MATLAB_WRAPPERS BUILD_CUDA options
Diffstat (limited to 'Wrappers/Matlab')
-rwxr-xr-xWrappers/Matlab/CMakeLists.txt68
1 files changed, 35 insertions, 33 deletions
diff --git a/Wrappers/Matlab/CMakeLists.txt b/Wrappers/Matlab/CMakeLists.txt
index 012bf96..e9cc6a8 100755
--- a/Wrappers/Matlab/CMakeLists.txt
+++ b/Wrappers/Matlab/CMakeLists.txt
@@ -75,41 +75,43 @@ endforeach()
add_custom_target(MatlabWrapper DEPENDS ${CPU_MEX_TARGETS})
-find_package(CUDA)
-if (CUDA_FOUND)
- file(GLOB GPU_MEX_FILES
- "${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_GPU/*.c"
- )
+if (BUILD_CUDA)
+ find_package(CUDA)
+ if (CUDA_FOUND)
+ file(GLOB GPU_MEX_FILES
+ "${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_GPU/*.c"
+ )
- list(LENGTH GPU_MEX_FILES num)
+ list(LENGTH GPU_MEX_FILES num)
- MATH(EXPR num "${num}-1")
-#set(num "-1")
+ MATH(EXPR num "${num}-1")
+ #set(num "-1")
- foreach(tgt RANGE ${num})
- message("number " ${tgt})
- #list(GET CPU_TARGETS ${tgt} current_target)
- list(GET GPU_MEX_FILES ${tgt} current_file)
- get_filename_component(current_target ${current_file} NAME)
- message("matlab_add_mex " ${current_target})
- matlab_add_mex(
- NAME ${current_target}
- SRC
- ${current_file}
- LINK_TO cilreg ${Matlab_LIBRARIES}
- )
-
- target_include_directories(${current_target}
- PUBLIC ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU
- ${CMAKE_SOURCE_DIR}/Core/regularisers_GPU
- ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU
- ${CMAKE_SOURCE_DIR}/Core/
- ${MATLAB_INCLUDE_DIR})
-
- list(APPEND CPU_MEX_TARGETS ${current_target})
- endforeach()
-
- add_custom_target(MatlabWrapperGPU DEPENDS ${GPU_MEX_TARGETS})
+ foreach(tgt RANGE ${num})
+ message("number " ${tgt})
+ #list(GET CPU_TARGETS ${tgt} current_target)
+ list(GET GPU_MEX_FILES ${tgt} current_file)
+ get_filename_component(current_target ${current_file} NAME)
+ message("matlab_add_mex " ${current_target})
+ matlab_add_mex(
+ NAME ${current_target}
+ SRC
+ ${current_file}
+ LINK_TO cilreg ${Matlab_LIBRARIES}
+ )
+
+ target_include_directories(${current_target}
+ PUBLIC ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU
+ ${CMAKE_SOURCE_DIR}/Core/regularisers_GPU
+ ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU
+ ${CMAKE_SOURCE_DIR}/Core/
+ ${MATLAB_INCLUDE_DIR})
+
+ list(APPEND CPU_MEX_TARGETS ${current_target})
+ endforeach()
+
+ add_custom_target(MatlabWrapperGPU DEPENDS ${GPU_MEX_TARGETS})
-endif()
+ endif()
+endif() \ No newline at end of file