CMakeLists.txt 1.9 KB
Newer Older
1
if(CXXTEST_FOUND)
2
  include_directories(SYSTEM 
3
				      ${CXXTEST_INCLUDE_DIR})
4

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  include_directories(../../TestHelpers/inc)
  # This variable is used within the cxxtest_add_test macro to build this helper
  # class into the test executable. It will go out of scope at the end of this
  # file so doesn't need un-setting
  set(TESTHELPER_SRCS
      ../../TestHelpers/src/ComponentCreationHelper.cpp
      ../../TestHelpers/src/FileComparisonHelper.cpp
      ../../TestHelpers/src/InstrumentCreationHelper.cpp
      ../../TestHelpers/src/ScopedFileHelper.cpp
      ../../TestHelpers/src/StartFrameworkManager.cpp
      ../../TestHelpers/src/TearDownWorld.cpp
      ../../TestHelpers/src/WorkspaceCreationHelper.cpp
      ../../TestHelpers/src/NexusTestHelper.cpp
      ../../TestHelpers/src/ONCatHelper.cpp
      ../../TestHelpers/src/ParallelRunner.cpp
20
21
      NXcanSASTestHelper.cpp
	  ../../TestHelpers/src/FileResource.cpp)
22

23
24
25
26
27
28
29
30
31
  cxxtest_add_test(DataHandlingTest ${TEST_FILES})
  target_include_directories(DataHandlingTest SYSTEM
                             PRIVATE ${HDF5_INCLUDE_DIRS})
  target_link_libraries(DataHandlingTest
                        LINK_PRIVATE
                        ${MANTIDLIBS}
                        Catalog
                        DataHandling
                        Nexus
Owen Arnold's avatar
Owen Arnold committed
32
                        HistogramData
33
34
                        ${NEXUS_LIBRARIES}
                        ${HDF5_LIBRARIES}
35
36
                        ${HDF5_HL_LIBRARIES}
                        gmock)
37

38
39
40
41
  if(ENABLE_LIB3MF)
    target_link_libraries(DataHandlingTest LINK_PRIVATE
                          ${LIB3MF_LIBRARIES})
  endif()
42

43
44
  add_dependencies(DataHandlingTest Algorithms MDAlgorithms)
  add_dependencies(FrameworkTests DataHandlingTest)
45
  # Test data
46
  add_dependencies(DataHandlingTest StandardTestData)
47

48
  # Add to the 'FrameworkTests' group in VS
49
50
  set_property(TARGET DataHandlingTest PROPERTY FOLDER "UnitTests")
endif()