forked from tudat-team/tudat-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset_up_cmake.sh
33 lines (29 loc) · 875 Bytes
/
set_up_cmake.sh
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
# allow input to set compilation config
while getopts d:j:c:t flag
do
case "${flag}" in
d) build_dir=${OPTARG};;
j) number_of_processors=${OPTARG};;
c) clean_build=${OPTARG};;
t) build_type=${OPTARG};;
esac
done
# env control arguments
BUILD_DIR="${build_dir:-build}"
RUN_TESTS="${run_tests:-1}"
BUILD_TESTS="${build_tests:-1}"
NUMBER_OF_PROCESSORS=${number_of_processors:-1}
CLEAN_BUILD=${clean_build:-0}
BUILD_TYPE=${build_type:-Release}
# retrieve root directory (the parent directory of this file)
root=$(dirname "$(realpath "$0")")
export CMAKE_COLOR_DIAGNOSTICS=ON
cd "${root}/${BUILD_DIR}"
cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DCMAKE_CXX_STANDARD=14 \
-DBoost_NO_BOOST_CMAKE=ON \
-G 'CodeBlocks - Unix Makefiles' \
-S "${root}" \
-B "${root}/${BUILD_DIR}"