Skip to content

Commit 740afe5

Browse files
authored
allow niftyreg to be built with opencl (#422)
Allow niftyreg to be built with opencl
1 parent 08b9f22 commit 740afe5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Registration/cReg/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ if (NIFTYREG_BUILT_WITH_CUDA)
7878
target_link_libraries(Reg PUBLIC ${CUDA_CUDART_LIBRARY})
7979
endif()
8080

81+
# If niftyreg was bulit with OpenCL
82+
if (NIFTYREG_BUILT_WITH_OPENCL)
83+
find_package(OpenCL REQUIRED)
84+
target_link_libraries(REG PUBLIC OpenCL::OpenCL)
85+
endif()
86+
8187
# Add boost library dependencies
8288
if((CMAKE_VERSION VERSION_LESS 3.5.0) OR (NOT _Boost_IMPORTED_TARGETS))
8389
# This is harder than it should be on older CMake versions to be able to cope with

0 commit comments

Comments
 (0)