Skip to content

Commit 71d7c7b

Browse files
paskinoevgueni-ovtchinnikovKrisThielemans
authored
Build gadgetron master (SyneRBI#438)
* allows user to pass CBLAS_LIBRARY and CBLAS_INCLUDE_DIR the CBLAS library needed by Gadgetron is currently found by Gadgetron's CMake. However, in the case that this fails the user can pass the variable CBLAS_LIBRARY and CBLAS_INCLUDE_DIR pointing to the cblas library and the location of cblas.h respectively. These are passed to Gadgetron's cmake as cached variables. * added range-v3 dependency for Gadgetron * creates env_ccppetmr.* symbolic links * updates to build Gadgetron master * add dependency for rocksdb * add librocksdb-dev * add pugixml * use ISMRMRD master * bump GTest version * add JSON as dependency for Gadgetron and bumb version * bump Boost version to 1.78 * add libBoost context * add RocksDB * skip copying of missing config file gadgetron/gadgetron#1024 * bump siemens_to_ismrmrd commit * add CPR to Gadgetron dependencies * add libboost-optional-dev * update boost dependency and build gadgetron testing * Add Date dependency * remove CPR dependency from Gadgetron * add golang to list of apt packages * change build command for mrd-storage-server * Use GTest 1.12.1 and glog 0.6.0 (SyneRBI#780) Fixes SyneRBI#778 * added pytest to requirements.txt * added pytest-cov to requirements * update range-v3 to 0.12.0 Merge master * install pkg-config * remove range-v3 from devel build * add GCC 11 non devel build * add option DISABLE_range-v3_TESTING * simplified Gadgetron USE CUDA logic * update CHANGELOG * simplify Gadgetron external project * closes SyneRBI#776 --------- Co-authored-by: Evgueni Ovtchinnikov <evgueni.ovtchinnikov@stfc.ac.uk> Co-authored-by: Kris Thielemans <k.thielemans@ucl.ac.uk>
1 parent 303d0db commit 71d7c7b

18 files changed

+441
-74
lines changed

.github/workflows/c-cpp.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,12 @@ jobs:
6161
BUILD_TYPE: "Release"
6262
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=OFF -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON -DUSE_ROOT:BOOL=ON"
6363
DEVEL_BUILD: "ON"
64-
- os: ubuntu-20.04
64+
- os: ubuntu-latest
6565
compiler: gcc
66-
compiler_version: 8
66+
compiler_version: 11
6767
BUILD_TYPE: "Release"
68-
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=OFF -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON"
68+
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=OFF -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON -DUSE_ROOT:BOOL=ON"
6969
DEVEL_BUILD: "OFF"
70-
7170
# let's run all of them, as opposed to aborting when one fails
7271
fail-fast: false
7372

@@ -119,14 +118,14 @@ jobs:
119118
set -ex;
120119
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
121120
export superbuild=`pwd`;
122-
export BUILD_FLAGS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=~/install";
121+
export BUILD_FLAGS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=~/install -DPYVER=3 -DUSE_SYSTEM_RocksDB=OFF -DBUILD_TESTING_Gadgetron:BOOL=ON";
123122
mkdir -p build/;
124123
cd build;
125124
source ~/virtualenv/bin/activate;
126125
cmake -S ${GITHUB_WORKSPACE} ${BUILD_FLAGS} ${EXTRA_BUILD_FLAGS} ${DEVEL_BUILD};
127126
- name: build
128127
shell: bash
129-
run:
128+
run: |
130129
cd ${GITHUB_WORKSPACE}/build;
131130
source ~/virtualenv/bin/activate;
132131
cmake --build . -j 2;

CHANGES.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
# ChangeLog
2+
3+
## Next
4+
- Build Gadgetron master. Requires new Ubuntu packages: libdcmtk-dev, libpugixml-dev, libgflags-dev,
5+
libssl-dev, libcurl4-openssl-dev, pkg-config, golang, libboost-coroutine-dev, libboost-context-dev, libboost-random-dev.
6+
- Added SuperBuild project dependency: range-v3, RocksDB, Date, mrd-storage-server
7+
- updated versions:
8+
- Gadgetron: 42f11bf14b77b16f1ca5bcfbfa435d5ee8cb22a6 (master)
9+
- RocksDB: 6.26.0
10+
- range-v3: 0.12.0
11+
- siemens_to_ismrmrd: 8bb8b08f53ce73c2de9ba5f47f1532f96292d92b
12+
- ISMRMRD: v1.13.2
13+
214
## v3.4.0
315
- Removed CIL-ASTRA as it has been merged into CIL code base.
416
- docker images updates

SuperBuild.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ option(USE_SYSTEM_SIRF "Build using an external version of SIRF" OFF)
196196
option(USE_SYSTEM_NIFTYREG "Build using an external version of NIFTYREG" OFF)
197197
option(USE_SYSTEM_GTest "Build using an external version of GTest" OFF)
198198
option(USE_SYSTEM_ACE "Build using an external version of ACE" ON)
199+
option(USE_SYSTEM_RocksDB "Build using an external version of RocksDB" ON)
199200

200201
# SPM requires matlab
201202
if (BUILD_MATLAB)
@@ -299,6 +300,7 @@ if (BUILD_Gadgetron)
299300
list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES Gadgetron)
300301
set(Armadillo_REQUIRED_VERSION 4.600)
301302
endif()
303+
option(DISABLE_range-v3_TESTING "Disable range-v3 testing" ON)
302304

303305
if (BUILD_siemens_to_ismrmrd)
304306
list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES siemens_to_ismrmrd)

SuperBuild/External_Boost_buildboost.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if(WIN32)
2222
# TODO: would be better to use a variable but for some reason KT cannot pass the variable to the execute_process
2323
# without strange error messages of b2
2424

25-
execute_process(COMMAND ./b2 --with-system --with-filesystem --with-thread --with-program_options --with-chrono --with-date_time --with-atomic --with-timer --with-test --with-random --with-regex install --prefix=${BOOST_INSTALL_DIR}
25+
execute_process(COMMAND ./b2 --with-system --with-filesystem --with-thread --with-program_options --with-chrono --with-date_time --with-atomic --with-timer --with-test --with-coroutine --with-context --with-random --with-regex install --prefix=${BOOST_INSTALL_DIR}
2626
WORKING_DIRECTORY ${BUILD_DIR} RESULT_VARIABLE build_result)
2727

2828
else(WIN32)

SuperBuild/External_Boost_configureboost.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if(WIN32)
2424
else()
2525
message(STATUS "Build dir is : ${BUILD_DIR}")
2626
execute_process(COMMAND ./bootstrap.sh --prefix=${BOOST_INSTALL_DIR}
27-
--with-libraries=system,filesystem,thread,program_options,chrono,date_time,atomic,timer,regex,test,random
27+
--with-libraries=system,filesystem,thread,program_options,chrono,date_time,atomic,timer,regex,test,coroutine,context,random
2828
#--with-libraries=system,thread,program_options,log,math...
2929
#--without-libraries=atomic...
3030

SuperBuild/External_Date.cmake

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#========================================================================
2+
# Author: Edoardo Pasca
3+
# Copyright 2022 UKRI STFC
4+
#
5+
# This file is part of the CCP SyneRBI (formerly PETMR) Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0.txt
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
#=========================================================================
20+
#This needs to be unique globally
21+
set(proj Date)
22+
23+
# Set dependency list
24+
set(${proj}_DEPENDENCIES "")
25+
26+
# Include dependent projects if any
27+
ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)
28+
29+
# Set external name (same as internal for now)
30+
set(externalProjName ${proj})
31+
SetCanonicalDirectoryNames(${proj})
32+
33+
if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalProjName}}" ) )
34+
message(STATUS "${__indent}Adding project ${proj}")
35+
36+
### --- Project specific additions here
37+
38+
39+
# Sets ${proj}_URL_MODIFIED and ${proj}_TAG_MODIFIED
40+
SetGitTagAndRepo("${proj}")
41+
42+
# conda build should never get here
43+
if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH")
44+
# in case of PYTHONPATH it is sufficient to copy the files to the
45+
# $PYTHONPATH directory
46+
ExternalProject_Add(${proj}
47+
${${proj}_EP_ARGS}
48+
${${proj}_EP_ARGS_GIT}
49+
${${proj}_EP_ARGS_DIRS}
50+
CMAKE_ARGS -DCMAKE_INSTALL_INCLUDEDIR:PATH=${SUPERBUILD_INSTALL_DIR}/include
51+
DEPENDS ${${proj}_DEPENDENCIES}
52+
)
53+
54+
else()
55+
# if SETUP_PY one can launch the conda build.sh script setting
56+
# the appropriate variables.
57+
message(FATAL_ERROR "Only PYTHONPATH install method is currently supported")
58+
endif()
59+
60+
61+
set(${proj}_ROOT ${${proj}_SOURCE_DIR})
62+
set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})
63+
64+
else()
65+
ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}"
66+
SOURCE_DIR ${${proj}_SOURCE_DIR}
67+
BINARY_DIR ${${proj}_BINARY_DIR}
68+
DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
69+
STAMP_DIR ${${proj}_STAMP_DIR}
70+
TMP_DIR ${${proj}_TMP_DIR}
71+
)
72+
endif()

SuperBuild/External_Gadgetron.cmake

+50-28
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
set(proj Gadgetron)
2626

2727
# Set dependency list
28-
set(${proj}_DEPENDENCIES "ACE;Boost;HDF5;ISMRMRD;FFTW3double;Armadillo;GTest")
28+
set(${proj}_DEPENDENCIES "ACE;Boost;HDF5;ISMRMRD;FFTW3double;Armadillo;GTest;range-v3;JSON;RocksDB;Date;mrd-storage-server")
2929

3030
# Include dependent projects if any
3131
ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)
3232

33+
3334
# Set external name (same as internal for now)
3435
set(externalProjName ${proj})
3536

@@ -55,16 +56,33 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
5556

5657
# BLAS
5758
find_package(BLAS)
58-
if (APPLE AND NOT (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR))
59-
# if the variables don't exist, let the user set them.
60-
SET(CBLAS_LIBRARY "" CACHE FILEPATH "CBLAS library")
61-
SET(CBLAS_INCLUDE_DIR "" CACHE PATH "CBLAS include directory")
62-
message(FATAL_ERROR "Gadgetron needs CBLAS_LIBRARY and CBLAS_INCLUDE_DIR. If
63-
these variables do not exist in your CMake, create them manually. CBLAS_LIBRARY
64-
and CBLAS_INCLUDE_DIR should be FILEPATH and PATH, respectively, and live in
65-
/usr/local/Cellar/openblas/ if installed with \"brew install openblas\".")
59+
60+
message(STATUS "CBLAS ${CBLAS_LIBRARY} ${CBLAS_INCLUDE_DIR}")
61+
if (NOT (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR))
62+
if (APPLE)
63+
# if the variables don't exist, let the user set them.
64+
SET(CBLAS_LIBRARY "" CACHE FILEPATH "CBLAS library")
65+
SET(CBLAS_INCLUDE_DIR "" CACHE PATH "CBLAS include directory")
66+
message(FATAL_ERROR "Gadgetron needs CBLAS_LIBRARY and CBLAS_INCLUDE_DIR. If
67+
these variables do not exist in your CMake, create them manually. CBLAS_LIBRARY
68+
and CBLAS_INCLUDE_DIR should be FILEPATH and PATH, respectively, and live in
69+
/usr/local/Cellar/openblas/ if installed with \"brew install openblas\".")
70+
endif()
6671
endif()
6772

73+
if (CBLAS_INCLUDE_DIR)
74+
message(STATUS "Adding CBLAS_INCLUDE_DIR to Gadgetron_CMAKE_ARGS: ${CBLAS_INCLUDE_DIR}")
75+
list (APPEND ${proj}_CMAKE_ARGS "-DCBLAS_INCLUDE_DIR:PATH=${CBLAS_INCLUDE_DIR}")
76+
else()
77+
message(STATUS "CBLAS_INCLUDE_DIR will be found (probably) by Gadgetron")
78+
endif()
79+
if (CBLAS_LIBRARY)
80+
message(STATUS "Adding CBLAS_LIBRARY to Gadgetron_CMAKE_ARGS: ${CBLAS_LIBRARY}")
81+
list(APPEND ${proj}_CMAKE_ARGS "-DCBLAS_LIBRARY:FILEPATH=${CBLAS_LIBRARY}")
82+
else()
83+
message(STATUS "CBLAS_LIBRARY will be found (probably) by Gadgetron")
84+
endif()
85+
6886
#option(Gadgetron_BUILD_PYTHON_SUPPORT
6987
# "Build Gadgetron Python gadgets (not required for SIRF)" OFF)
7088
set(Gadgetron_BUILD_PYTHON_SUPPORT OFF) # <-Disabled for v1.0
@@ -74,7 +92,13 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
7492
"Build Gadgetron MATLAB gadgets (not required for SIRF)" ${default_Gadgetron_BUILD_MATLAB_SUPPORT})
7593
option(Gadgetron_USE_MKL "Instruct Gadgetron to build linking to the MKL. The user must be able to install MKL on his own." OFF)
7694

77-
option(${proj}_USE_CUDA "Enable ${proj} CUDA (if cuda libraries are present)" ${USE_CUDA})
95+
96+
if (USE_CUDA)
97+
option(${proj}_USE_CUDA "Enable ${proj} CUDA" ${USE_CUDA})
98+
else()
99+
set (${proj}_USE_CUDA OFF)
100+
endif()
101+
78102
mark_as_advanced(${proj}_USE_CUDA)
79103

80104
if (NOT DISABLE_OpenMP)
@@ -95,35 +119,33 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
95119

96120
# Sets ${proj}_URL_MODIFIED and ${proj}_TAG_MODIFIED
97121
SetGitTagAndRepo("${proj}")
98-
99-
ExternalProject_Add(${proj}
100-
${${proj}_EP_ARGS}
101-
${${proj}_EP_ARGS_GIT}
102-
${${proj}_EP_ARGS_DIRS}
103-
104-
CMAKE_ARGS
105-
-DBUILD_PYTHON_SUPPORT:BOOL=${Gadgetron_BUILD_PYTHON_SUPPORT}
106-
-DBUILD_MATLAB_SUPPORT:BOOL=${Gadgetron_BUILD_MATLAB_SUPPORT}
122+
set (${proj}_CMAKE_ARGS
123+
-DBUILD_PYTHON_SUPPORT:BOOL=${${proj}_BUILD_PYTHON_SUPPORT}
124+
-DBUILD_MATLAB_SUPPORT:BOOL=${${proj}_BUILD_MATLAB_SUPPORT}
107125
-DCMAKE_PREFIX_PATH:PATH=${SUPERBUILD_INSTALL_DIR}
108126
-DCMAKE_LIBRARY_PATH:PATH=${SUPERBUILD_INSTALL_DIR}/lib
109127
-DCMAKE_INCLUDE_PATH:PATH=${SUPERBUILD_INSTALL_DIR}/include
110-
-DCMAKE_INSTALL_PREFIX:PATH=${Gadgetron_INSTALL_DIR}
128+
-DCMAKE_INSTALL_PREFIX:PATH=${${proj}_INSTALL_DIR}
111129
${Boost_CMAKE_ARGS}
112130
${PYTHONLIBS_CMAKE_ARGS}
113131
${GTest_CMAKE_ARGS}
114132
${HDF5_CMAKE_ARGS}
115133
${FFTW3_CMAKE_ARGS}
116134
-DISMRMRD_DIR:PATH=${ISMRMRD_DIR}
117-
-DUSE_MKL:BOOL=${Gadgetron_USE_MKL}
135+
-DUSE_MKL:BOOL=${${proj}_USE_MKL}
118136
-DUSE_CUDA:BOOL=${${proj}_USE_CUDA}
119-
-DCBLAS_INCLUDE_DIR:PATH=${CBLAS_INCLUDE_DIR}
120-
-DCBLAS_LIBRARY:FILEPATH=${CBLAS_LIBRARY}
121137
-DUSE_OPENMP:BOOL=${${proj}_ENABLE_OPENMP}
122-
DEPENDS
123-
${${proj}_DEPENDENCIES}
124-
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
125-
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/patches/Gadgetron_include-patch.py ${SUPERBUILD_INSTALL_DIR}/include/gadgetron/hoNFFT.h ${SUPERBUILD_INSTALL_DIR}/include/gadgetron/hoNFFT.h
126-
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/patches/copy_file_if_not_exists.py ${SUPERBUILD_INSTALL_DIR}/share/gadgetron/config/gadgetron.xml.example ${SUPERBUILD_INSTALL_DIR}/share/gadgetron/config/gadgetron.xml
138+
-DBUILD_TESTING:BOOL=ON
139+
)
140+
141+
142+
ExternalProject_Add(${proj}
143+
${${proj}_EP_ARGS}
144+
${${proj}_EP_ARGS_GIT}
145+
${${proj}_EP_ARGS_DIRS}
146+
147+
CMAKE_ARGS ${${proj}_CMAKE_ARGS}
148+
DEPENDS ${${proj}_DEPENDENCIES}
127149
)
128150

129151
set(Gadgetron_ROOT ${Gadgetron_SOURCE_DIR})

SuperBuild/External_ISMRMRD.cmake

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#========================================================================
22
# Author: Benjamin A Thomas
33
# Author: Kris Thielemans
4+
# Author: Edoardo Pasca
45
# Copyright 2017, 2020 University College London
6+
# Copyright 2023 United Kingdom Research and Innovation
57
#
68
# This file is part of the CCP SyneRBI (formerly PETMR) Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
79
#
@@ -65,7 +67,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
6567
-DCMAKE_INSTALL_PREFIX:PATH=${ISMRMRD_INSTALL_DIR}
6668
-DCMAKE_PREFIX_PATH:PATH=${SUPERBUILD_INSTALL_DIR}
6769
-DCMAKE_LIBRARY_PATH:PATH=${SUPERBUILD_INSTALL_DIR}/lib
68-
# -DCMAKE_EXE_LINKER_FLAGS:STRING="-lcurl"
6970
${HDF5_CMAKE_ARGS}
7071
${FFTW3_CMAKE_ARGS}
7172
${Boost_CMAKE_ARGS}
@@ -77,7 +78,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
7778

7879
if (BUILD_TESTING_${proj})
7980
add_test(NAME ${proj}_TESTS
80-
COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIGURATION> --target check
81+
COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --output-on-failure
8182
WORKING_DIRECTORY ${${proj}_BINARY_DIR})
8283
endif()
8384

SuperBuild/External_RocksDB.cmake

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#========================================================================
2+
# Author: Edoardo Pasca
3+
# Copyright 2018, 2020 STFC
4+
#
5+
# This file is part of the CCP SyneRBI (formerly PETMR) Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0.txt
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
#=========================================================================
20+
21+
#This needs to be unique globally
22+
set(proj RocksDB)
23+
24+
# Set dependency list
25+
set(${proj}_DEPENDENCIES "")
26+
27+
# Include dependent projects if any
28+
ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)
29+
30+
# Set external name (same as internal for now)
31+
set(externalProjName ${proj})
32+
SetCanonicalDirectoryNames(${proj})
33+
34+
if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalProjName}}" ) )
35+
message(STATUS "${__indent}Adding project ${proj}")
36+
37+
### --- Project specific additions here
38+
SetGitTagAndRepo("${proj}")
39+
40+
# conda build should never get here
41+
set (${proj}_CMAKE_ARGS
42+
-DCMAKE_INSTALL_PREFIX:PATH=${${proj}_INSTALL_DIR}
43+
)
44+
ExternalProject_Add(${proj}
45+
${${proj}_EP_ARGS}
46+
${${proj}_EP_ARGS_GIT}
47+
${${proj}_EP_ARGS_DIRS}
48+
49+
CMAKE_ARGS ${${proj}_CMAKE_ARGS}
50+
)
51+
52+
set(${proj}_ROOT ${${proj}_SOURCE_DIR})
53+
set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})
54+
55+
# add_test(NAME range_TESTS_
56+
# COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --output-on-failure
57+
# WORKING_DIRECTORY ${${proj}_BINARY_DIR})
58+
59+
else()
60+
ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}"
61+
SOURCE_DIR ${${proj}_SOURCE_DIR}
62+
BINARY_DIR ${${proj}_BINARY_DIR}
63+
DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
64+
STAMP_DIR ${${proj}_STAMP_DIR}
65+
TMP_DIR ${${proj}_TMP_DIR}
66+
)
67+
endif()

0 commit comments

Comments
 (0)