Skip to content
Snippets Groups Projects
Commit 8b358968 authored by Mark Hodgkinson's avatar Mark Hodgkinson Committed by Stewart Martin-Haugh
Browse files

Merge branch 'NinjaMake' into 'master'

Add option to build with ninja to build script

See merge request !5156

(cherry picked from commit a87cb54c [formerly 0b9fb6a6])

38f18018 Merge branch 'master' of https://gitlab.cern.ch:8443/atlas/athena
09271c78 Merge branch 'master' of https://gitlab.cern.ch:8442/atlas/athena
0cca206b Merge branch 'master' of https://gitlab.cern.ch:8443/atlas/athena
a8d866c2 Merge branch 'master' of https://gitlab.cern.ch:8443/atlas/athena
30d21f0d Merge branch 'master' of https://gitlab.cern.ch:8443/atlas/athena
ea9052da Merge branch 'master' of https://gitlab.cern.ch:8443/atlas/athena
52c24699 Added option to build athena using Ninja
30778e97 Different install rule for ninja
41bdfbc7 Set environment varible before command

Former-commit-id: 580e4e2739bff2519e354d760609eeb535ecfc3b
parent 4b53bbde
No related branches found
No related tags found
No related merge requests found
File mode changed from 100755 to 100644
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -12,6 +12,8 @@ usage() { ...@@ -12,6 +12,8 @@ usage() {
echo " -i: Execute install step" echo " -i: Execute install step"
echo " -p: Execute CPack step" echo " -p: Execute CPack step"
echo " -a: Abort on error" echo " -a: Abort on error"
echo " -N: Use Ninja"
echo "If none of the c, m, i or p options are set then the script will do" echo "If none of the c, m, i or p options are set then the script will do"
echo "*all* steps. Otherwise only the enabled steps are run - it's your" echo "*all* steps. Otherwise only the enabled steps are run - it's your"
echo "reponsibility to ensure that precusors are in good shape" echo "reponsibility to ensure that precusors are in good shape"
...@@ -25,7 +27,10 @@ EXE_MAKE="" ...@@ -25,7 +27,10 @@ EXE_MAKE=""
EXE_INSTALL="" EXE_INSTALL=""
EXE_CPACK="" EXE_CPACK=""
NIGHTLY=true NIGHTLY=true
while getopts ":t:b:hcmipa" opt; do BUILDTOOLTYPE=""
BUILDTOOL="make -k"
INSTALLRULE="install/fast"
while getopts ":t:b:hcmipaN" opt; do
case $opt in case $opt in
t) t)
BUILDTYPE=$OPTARG BUILDTYPE=$OPTARG
...@@ -48,6 +53,11 @@ while getopts ":t:b:hcmipa" opt; do ...@@ -48,6 +53,11 @@ while getopts ":t:b:hcmipa" opt; do
a) a)
NIGHTLY=false NIGHTLY=false
;; ;;
N)
BUILDTOOL="ninja -k 0"
BUILDTOOLTYPE="-GNinja"
INSTALLRULE="install"
;;
h) h)
usage usage
exit 0 exit 0
...@@ -102,7 +112,7 @@ if [ -n "$EXE_CMAKE" ]; then ...@@ -102,7 +112,7 @@ if [ -n "$EXE_CMAKE" ]; then
# from scratch in an incremental build. # from scratch in an incremental build.
rm -f CMakeCache.txt rm -f CMakeCache.txt
# Now run the actual CMake configuration: # Now run the actual CMake configuration:
time cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ time cmake ${BUILDTOOLTYPE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \
-DCTEST_USE_LAUNCHERS:BOOL=TRUE \ -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
${AthenaSrcDir} 2>&1 | tee cmake_config.log ${AthenaSrcDir} 2>&1 | tee cmake_config.log
fi fi
...@@ -115,13 +125,13 @@ fi ...@@ -115,13 +125,13 @@ fi
# make: # make:
if [ -n "$EXE_MAKE" ]; then if [ -n "$EXE_MAKE" ]; then
time make -k 2>&1 | tee cmake_build.log time ${BUILDTOOL} 2>&1 | tee cmake_build.log
fi fi
# Install the results: # Install the results:
if [ -n "$EXE_INSTALL" ]; then if [ -n "$EXE_INSTALL" ]; then
time make install/fast \ time DESTDIR=${BUILDDIR}/install/Athena/${NICOS_PROJECT_VERSION} ${BUILDTOOL} ${INSTALLRULE} \
DESTDIR=${BUILDDIR}/install/Athena/${NICOS_PROJECT_VERSION} 2>&1 | tee cmake_install.log 2>&1 | tee cmake_install.log
fi fi
# Build an RPM for the release: # Build an RPM for the release:
......
File mode changed from 100644 to 100755
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment