Fix for those scripts

Use the `${INIT_FILE:+..}` syntax, for compatibility when `INIT_FILE`
is unset or empty.
This commit is contained in:
Laurent Rineau 2018-09-04 12:01:25 +02:00
parent 8c744204de
commit 3fc43f9e9f
2 changed files with 6 additions and 6 deletions

View File

@ -525,7 +525,7 @@ export MAKE_CMD;
export CGAL_BINARY_DIR;
export CGAL_REFERENCE_CACHE_DIR;
cd '${CGAL_BINARY_DIR}';
cmake -C"${CGAL_REFERENCE_CACHE_DIR}/init.cmake" '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE \\
cmake \${INIT_FILE:+"-C\${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE \\
-DCGAL_REFERENCE_CACHE_DIR="\$CGAL_REFERENCE_CACHE_DIR" \\
VERBOSE=1 \\
../../..;

View File

@ -74,20 +74,20 @@ cat << EOF
EOF
header "configure"
cat << EOF
cat << 'EOF'
configure()
{
echo "Configuring... "
if eval 'cmake -C"\$INIT_FILE" "\$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \\
-DCGAL_DIR="\$CGAL_DIR" \\
if eval 'cmake ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \\
-DCGAL_DIR="$CGAL_DIR" \\
--no-warn-unused-cli \\
.' ; then
echo " successful configuration" >> \$ERRORFILE
echo " successful configuration" >> $ERRORFILE
else
echo " ERROR: configuration" >> \$ERRORFILE
echo " ERROR: configuration" >> $ERRORFILE
fi
}