forked from AmbaPant/mantid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
44 lines (42 loc) · 1.29 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
# Fetch any externally-managed interfaces
include(ExternalProject)
# mslice
set(_mslice_external_root ${CMAKE_CURRENT_BINARY_DIR}/mslice)
externalproject_add(
mslice
PREFIX ${_mslice_external_root}
GIT_REPOSITORY "https://github.com/mantidproject/mslice.git"
GIT_TAG 7444a0122d3e3395c09e34c7da6ffc2c0d991fea
EXCLUDE_FROM_ALL 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
TEST_COMMAND ""
INSTALL_COMMAND ""
)
message(STATUS "Fetching/updating mslice")
execute_process(
COMMAND ${CMAKE_COMMAND} ARGS -P ${_mslice_external_root}/tmp/mslice-gitclone.cmake RESULT_VARIABLE _exit_code
)
if(_exit_code EQUAL 0)
execute_process(
COMMAND ${CMAKE_COMMAND} ARGS -P ${_mslice_external_root}/tmp/mslice-gitupdate.cmake RESULT_VARIABLE _exit_code
)
if(NOT _exit_code EQUAL 0)
message(FATAL_ERROR "Unable to update mslice.")
endif()
else()
message(FATAL_ERROR "Unable to clone mslice")
endif()
# Let the parent lists file know where dev copy of mslice is
set(MSLICE_DEV
${_mslice_external_root}/src/mslice
PARENT_SCOPE
)
# Installation MSLICE_DEV is only set in PARENT_SCOPE! so don't use it here
foreach(_bundle ${BUNDLES})
install(
DIRECTORY ${_mslice_external_root}/src/mslice/mslice/
DESTINATION ${_bundle}scripts/ExternalInterfaces/mslice
COMPONENT Runtime
)
endforeach()