forked from AmbaPant/mantid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
44 lines (36 loc) · 1.51 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
# C++ unit tests
set(TEST_FILES
IFunction1DAdapterTest.h
IPeakFunctionAdapterTest.h
PropertyWithValueFactoryTest.h
PythonAlgorithmInstantiatorTest.h
PythonStdoutChannelTest.h
PySequenceToVectorTest.h
RunPythonScriptTest.h
ToPyListTest.h)
if(CXXTEST_FOUND)
include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR})
set(CXXTEST_EXTRA_HEADER_INCLUDE
"${CMAKE_CURRENT_LIST_DIR}/PythonInterfaceCppTestInitialization.h")
set(_pythoninterface_test_target_name PythonInterfaceCppTest)
cxxtest_add_test(${_pythoninterface_test_target_name} ${TEST_FILES})
set_pythonpath_for_cxxtests(${_pythoninterface_test_target_name} "${TEST_FILES}")
if(WIN32)
set_target_properties(${_pythoninterface_test_target_name}
PROPERTIES COMPILE_FLAGS "/w44244")
endif()
target_include_directories(${_pythoninterface_test_target_name} PUBLIC ${CMAKE_BINARY_DIR}/Framework/Types)
target_link_libraries(${_pythoninterface_test_target_name}
LINK_PRIVATE
API
Geometry
Kernel
PythonInterfaceCore
PythonKernelModule
PythonAPIModule
${Boost_LIBRARIES}
${POCO_LIBRARIES})
add_dependencies(FrameworkTests ${_pythoninterface_test_target_name})
# Add to the 'UnitTests' group in VS
set_property(TARGET ${_pythoninterface_test_target_name} PROPERTY FOLDER "UnitTests")
endif()