File: CMakeLists.txt

package info (click to toggle)
elastix 5.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 45,644 kB
  • sloc: cpp: 85,720; lisp: 4,118; python: 1,045; sh: 200; xml: 182; makefile: 33
file content (53 lines) | stat: -rw-r--r-- 1,535 bytes parent folder | download
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
41
42
43
44
45
46
47
48
49
50
51
52
53
set(ELX_COMMON_GTEST_SOURCES
  ../../Core/Main/GTesting/elxCoreMainGTestUtilities.h
  ../../Core/Main/GTesting/elxCoreMainGTestUtilities.cxx
  elxConversionGTest.cxx
  elxDefaultConstructGTest.cxx
  elxElastixMainGTest.cxx
  elxGTestUtilities.h
  elxResampleInterpolatorGTest.cxx
  elxResamplerGTest.cxx
  elxTransformIOGTest.cxx
  itkAdvancedImageToImageMetricGTest.cxx
  itkAdvancedMeanSquaresImageToImageMetricGTest.cxx
  itkComputeImageExtremaFilterGTest.cxx
  itkCorrespondingPointsEuclideanDistancePointMetricGTest.cxx
  itkGridScheduleComputerGTest.cxx
  itkImageFileCastWriterGTest.cxx
  itkImageFullSamplerGTest.cxx
  itkImageGridSamplerGTest.cxx
  itkImageRandomCoordinateSamplerGTest.cxx
  itkImageRandomSamplerGTest.cxx
  itkImageRandomSamplerSparseMaskGTest.cxx
  itkImageSamplerGTest.cxx
  itkParameterMapInterfaceTest.cxx
)

if(USE_ImpactMetric)
  list(APPEND ELX_COMMON_GTEST_SOURCES elxImpactMetricGTest.cxx)
endif()

add_executable(CommonGTest ${ELX_COMMON_GTEST_SOURCES})

target_compile_definitions(CommonGTest PRIVATE
  _USE_MATH_DEFINES # For M_PI.
  ELX_CMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
  ELX_CMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}"
)

if(USE_ImpactMetric)
  find_package(Torch REQUIRED)
  target_link_libraries(CommonGTest
   GTest::GTest GTest::Main
    ${ITK_LIBRARIES}
    elastix_lib
    "${TORCH_LIBRARIES}")
else()
  target_link_libraries(CommonGTest
    GTest::GTest GTest::Main
    ${ITK_LIBRARIES}
    elastix_lib
    )
endif()

add_test(NAME CommonGTest_test COMMAND CommonGTest)