-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (34 loc) · 1006 Bytes
/
CMakeLists.txt
File metadata and controls
40 lines (34 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
add_executable(ElastixLibGTest
elxCoreMainGTestUtilities.h
elxCoreMainGTestUtilities.cxx
ElastixLibGTest.cxx
GetDefaultParameterMapGTest.cxx
itkElastixRegistrationMethodGTest.cxx
itkTransformixFilterGTest.cxx
ParameterObjectGTest.cxx
)
target_compile_definitions(ElastixLibGTest PRIVATE
_USE_MATH_DEFINES # For M_PI.
)
if (ITK_VERSION VERSION_LESS_EQUAL 5.4.5)
target_link_libraries(ElastixLibGTest
GTest::GTest
GTest::Main
elastix_lib
transformix_lib
${ELASTIX_ITK_EXECUTABLE_LIBRARIES}
)
else()
target_link_libraries(ElastixLibGTest
GTest::gtest
GTest::gtest_main
elastix_lib
transformix_lib
${ELASTIX_ITK_EXECUTABLE_LIBRARIES}
)
endif()
target_compile_definitions(ElastixLibGTest PRIVATE ELX_CMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}" ELX_CMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}")
if(ELASTIX_USE_OPENCL)
target_link_libraries(ElastixLibGTest elxOpenCL)
endif()
add_test(NAME ElastixLibGTest_test COMMAND ElastixLibGTest)