Skip to content
Snippets Groups Projects
Commit 47fd10c9 authored by Ger van Diepen's avatar Ger van Diepen
Browse files

bug 1389:

Set TESTING OFF unless -test or -check is given
parent a2942967
Branches
Tags
No related merge requests found
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
# Run as: makeCMakeCache sourceroot lofarconf_file outfile # Run as: makeCMakeCache sourceroot lofarconf_file outfile
# E.g. makeCMakeCache ~/LOFAR ~/LOFAR/lofarconf.in.private CMakeCache # E.g. makeCMakeCache ~/LOFAR ~/LOFAR/lofarconf.in.private CMakeCache
if test $# != 3; then if test $# != 4; then
echo "Run as: makeCMakeCache sourceroot lofarconf_file outfile" echo "Run as: makeCMakeCache sourceroot lofarconf_file buildtest outfile"
exit 1 exit 1
fi fi
# Create output file. # Create output file.
rm -f $3 rm -f $4
touch $3 touch $4
# Find the packages to be built. # Find the packages to be built.
pkgs= pkgs=
...@@ -64,20 +64,22 @@ do ...@@ -64,20 +64,22 @@ do
break break
fi fi
done done
echo "//Build package $pkg?" >> $3 echo "//Build package $pkg?" >> $4
echo "BUILD_$pkg:BOOL=$opt" >> $3 echo "BUILD_$pkg:BOOL=$opt" >> $4
echo "" >> $3 echo "" >> $4
fi fi
fi fi
done done
# By default do not build test programs. # Optionally build test programs.
#echo "//Build the testing tree." >> $3 btest=ON
#echo "BUILD_TESTING:BOOL=OFF" >> $3 test $3 = 1 || btest=OFF
#echo "" >> $3 echo "//Build the testing tree?" >> $4
echo "BUILD_TESTING:BOOL=$btest" >> $4
echo "" >> $4
# LOFAR needs to be built. # LOFAR needs to be built.
echo "//Build packageLOFAR?." >> $3 echo "//Build packageLOFAR?." >> $4
echo "BUILD_LOFAR:BOOL=ON" >> $3 echo "BUILD_LOFAR:BOOL=ON" >> $4
echo "" >> $3 echo "" >> $4
exit 0 exit 0
...@@ -127,6 +127,7 @@ confcmd= ...@@ -127,6 +127,7 @@ confcmd=
premake= premake=
mainmake=date mainmake=date
postmake= postmake=
cmaketest=0
# If -k, continue in case of failure, so use ; to separate commands. # If -k, continue in case of failure, so use ; to separate commands.
ksep="&&" ksep="&&"
[ $kopt = 1 ] && ksep=";" [ $kopt = 1 ] && ksep=";"
...@@ -136,13 +137,13 @@ fi ...@@ -136,13 +137,13 @@ fi
if [ $buildmake = 1 ]; then if [ $buildmake = 1 ]; then
mainmake="date $ksep make $kstr $jobsopt " mainmake="date $ksep make $kstr $jobsopt "
if [ $bldtest = 1 ]; then if [ $bldtest = 1 ]; then
if [ $cmake = 1 ]; then cmaketest=1
postmake="$ksep make test" if [ $cmake = 0 ]; then
else
postmake="$ksep (if [ -d test ]; then cd test $ksep make test; fi;)" postmake="$ksep (if [ -d test ]; then cd test $ksep make test; fi;)"
fi fi
fi fi
if [ $check = 1 ]; then if [ $check = 1 ]; then
cmaketest=1
if [ "$checktool" = "" ]; then if [ "$checktool" = "" ]; then
postmake="$postmake $ksep make $kstr check" postmake="$postmake $ksep make $kstr check"
else else
...@@ -180,8 +181,8 @@ if [ $cmake = 1 ]; then ...@@ -180,8 +181,8 @@ if [ $cmake = 1 ]; then
mkdir -p build/$variant >> $logfile 2>&1 || exit 1 mkdir -p build/$variant >> $logfile 2>&1 || exit 1
cd build/$variant >> $logfile 2>&1 || exit 1 cd build/$variant >> $logfile 2>&1 || exit 1
echo ":::::: BUILDING VARIANT $variant " >> $srcdir/$logfile echo ":::::: BUILDING VARIANT $variant " >> $srcdir/$logfile
echo "$srcdir/CMake/makeCMakeCache $srcdir $srcdir/lofarconf.in.private CMakeCache.txt && cmake -DCMAKE_MODULE_PATH:PATH=$srcdir/CMake $srcdir && $premake $mainmake $postmake" >> $srcdir/$logfile echo "$srcdir/CMake/makeCMakeCache $srcdir $srcdir/lofarconf.in.private $cmaketest CMakeCache.txt && cmake -DCMAKE_MODULE_PATH:PATH=$srcdir/CMake $srcdir && $premake $mainmake $postmake" >> $srcdir/$logfile
eval "($srcdir/CMake/makeCMakeCache $srcdir $srcdir/lofarconf.in.private CMakeCache.txt && cmake -DCMAKE_MODULE_PATH:PATH=$srcdir/CMake $srcdir && $premake $mainmake $postmake)" >> $srcdir/$logfile 2>&1 eval "($srcdir/CMake/makeCMakeCache $srcdir $srcdir/lofarconf.in.private $cmaketest CMakeCache.txt && cmake -DCMAKE_MODULE_PATH:PATH=$srcdir/CMake $srcdir && $premake $mainmake $postmake)" >> $srcdir/$logfile 2>&1
status=$? status=$?
echo ":::::: FINISHED BUILDING VARIANT $variant" >> $srcdir/$logfile echo ":::::: FINISHED BUILDING VARIANT $variant" >> $srcdir/$logfile
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment