forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (44 loc) · 1.73 KB
/
CMakeLists.txt
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
if(CXXTEST_FOUND)
# This is required to pick up NexusTestHelper
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/NexusTestHelper.cpp
../../TestHelpers/src/LoggingCleaner.cpp)
cxxtest_add_test(KernelTest ${TEST_FILES})
target_include_directories(KernelTest SYSTEM PRIVATE
${CXXTEST_INCLUDE_DIR}
../../TestHelpers/inc)
target_link_libraries(KernelTest
PRIVATE
Types
Kernel
${NEXUS_LIBRARIES}
${Boost_LIBRARIES}
${POCO_LIBRARIES}
gmock
${JSONCPP_LIBRARIES}
${TBB_LIBRARIES}
${TBB_MALLOC_LIBRARIES})
add_dependencies(FrameworkTests KernelTest)
# Test data
add_dependencies(KernelTest StandardTestData)
# Add to the 'FrameworkTests' group in VS
set_property(TARGET KernelTest PROPERTY FOLDER "UnitTests")
add_custom_command(
TARGET KernelTest POST_BUILD
COMMAND
${CMAKE_COMMAND}
ARGS -E
copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/../../Properties/MantidTest.properties
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
COMMAND
${CMAKE_COMMAND}
ARGS
-E
copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/../../Properties/MantidTest.user.properties
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR})
endif()