forked from AmbaPant/mantid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
38 lines (29 loc) · 1.27 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
set(SRC_FILES src/BroadcastWorkspace.cpp src/GatherWorkspaces.cpp)
set(INC_FILES inc/MantidMPIAlgorithms/BroadcastWorkspace.h inc/MantidMPIAlgorithms/GatherWorkspaces.h
inc/MantidMPIAlgorithms/MPISerialization.h
)
set(TEST_FILES BroadcastWorkspaceTest.h GatherWorkspacesTest.h)
if(COVERAGE)
foreach(loop_var ${SRC_FILES} ${INC_FILES})
set_property(GLOBAL APPEND PROPERTY COVERAGE_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
endforeach(loop_var)
endif()
# Add the target for this directory
add_library(MPIAlgorithms ${SRC_FILES} ${INC_FILES})
add_library(Mantid::MPIAlgorithms ALIAS MPIAlgorithms)
target_include_directories(
MPIAlgorithms PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc> $<INSTALL_INTERFACE:include/Mantid>
)
# Set the name of the generated library
set_target_properties(MPIAlgorithms PROPERTIES OUTPUT_NAME MantidMPIAlgorithms)
# Add to the 'Framework' group in VS
set_property(TARGET Algorithms PROPERTY FOLDER "MantidFramework")
target_link_libraries(
MPIAlgorithms
PUBLIC Mantid::API Mantid::DataObjects
PRIVATE Mantid::Kernel ${MPI_CXX_LIBRARIES}
)
# Add the unit tests directory
add_subdirectory(test)
# Installation settings
mtd_install_targets(TARGETS MPIAlgorithms INSTALL_DIRS ${PLUGINS_DIR} ${WORKBENCH_PLUGINS_DIR})