-
Notifications
You must be signed in to change notification settings - Fork 122
/
CMakeLists.txt
29 lines (23 loc) · 1.33 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
if ( CXXTEST_FOUND )
include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} )
include_directories ( ../../TestHelpers/inc ../../DataHandling/inc )
# This variable is used within the cxxtest_add_test macro to build these helper classes 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/TearDownWorld.cpp
../../TestHelpers/src/ComponentCreationHelper.cpp
../../TestHelpers/src/WorkspaceCreationHelper.cpp
../../TestHelpers/src/MDEventsTestHelper.cpp
../../TestHelpers/src/ScopedFileHelper.cpp
../../TestHelpers/src/BoxControllerDummyIO.cpp
)
if ( GMOCK_FOUND AND GTEST_FOUND )
cxxtest_add_test ( MDEventsTest ${TEST_FILES} ${GMOCK_TEST_FILES} )
target_link_libraries( MDEventsTest MDEvents ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES} DataHandling )
else ()
cxxtest_add_test ( MDEventsTest ${TEST_FILES} )
target_link_libraries( MDEventsTest MDEvents DataHandling)
endif ()
add_dependencies ( FrameworkTests MDEventsTest )
# Add to the 'FrameworkTests' group in VS
set_property ( TARGET MDEventsTest PROPERTY FOLDER "UnitTests" )
endif ()