forked from AmbaPant/mantid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
54 lines (49 loc) · 2 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
50
51
52
53
54
# testhelpers Python module
# Create the targets for this directory
set(FRAMEWORK_DIR ../../..)
include_directories(
${FRAMEWORK_DIR}/CurveFitting/inc ${FRAMEWORK_DIR}/DataHandling/inc ${FRAMEWORK_DIR}/DataObjects/inc
${FRAMEWORK_DIR}/Nexus/inc ${FRAMEWORK_DIR}/TestHelpers/inc
)
# WorkspaceCreationHelper
set(SRC_FILES
WorkspaceCreationHelper/WorkspaceCreationHelperModule.cpp
${FRAMEWORK_DIR}/TestHelpers/src/ComponentCreationHelper.cpp
${FRAMEWORK_DIR}/TestHelpers/src/MDEventsTestHelper.cpp
${FRAMEWORK_DIR}/TestHelpers/src/InstrumentCreationHelper.cpp
${FRAMEWORK_DIR}/TestHelpers/src/WorkspaceCreationHelper.cpp
)
add_library(PythonWorkspaceCreationHelper ${SRC_FILES} ${INC_FILES})
set_python_properties(PythonWorkspaceCreationHelper _WorkspaceCreationHelper)
# Override folder
set_property(TARGET PythonWorkspaceCreationHelper PROPERTY FOLDER "UnitTests/Python")
target_link_libraries(
PythonWorkspaceCreationHelper
PRIVATE PythonInterfaceCore
PythonAPIModule
DataObjects
DataHandling
API
HistogramData
Indexing
Types
Kernel
Geometry
${Boost_LIBRARIES}
${POCO_LIBRARIES}
gmock
)
# Overall testhelpers target .pth file for discovery (only needed for development)
set(_testhelpers_pth_src "${CMAKE_CURRENT_BINARY_DIR}/testhelpers.pth")
set(_testhelpers_pth_dest "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/testhelpers.pth")
file(WRITE ${_testhelpers_pth_src} "${CMAKE_CURRENT_LIST_DIR}/..\n")
add_custom_command(
OUTPUT ${_testhelpers_pth_dest}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_testhelpers_pth_src} ${_testhelpers_pth_dest}
DEPENDS ${_testhelpers_pth_src}
COMMENT "Generating testhelpers .pth file"
)
add_custom_target(testhelpers DEPENDS PythonWorkspaceCreationHelper ${_testhelpers_pth_dest})
add_dependencies(PythonInterface ScriptsDotPth)
add_dependencies(FrameworkTests testhelpers)
set_property(TARGET testhelpers PROPERTY FOLDER "UnitTests/Python")