forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (36 loc) · 1.5 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
# 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
c297c1e8db9308ae5bd3dc5a9c581293d0b5a5d7
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)
endforeach()