Commit 7070b868 authored by Dominik Charousset's avatar Dominik Charousset

Fix whitespace handling in configure script

parent 2e7aca4e
...@@ -91,7 +91,7 @@ $benchmark_suite_options" ...@@ -91,7 +91,7 @@ $benchmark_suite_options"
# $3 is the cache entry variable value # $3 is the cache entry variable value
append_cache_entry () append_cache_entry ()
{ {
CMakeCacheEntries="$CMakeCacheEntries -D $1:$2=$3" CMakeCacheEntries="$CMakeCacheEntries \"-D $1:$2=$3\""
} }
# Creates a build directory via CMake. # Creates a build directory via CMake.
...@@ -102,6 +102,7 @@ append_cache_entry () ...@@ -102,6 +102,7 @@ append_cache_entry ()
# $5 is the CMake generator. # $5 is the CMake generator.
configure () configure ()
{ {
CMakeCacheEntries=$CMakeDefaultCache CMakeCacheEntries=$CMakeDefaultCache
if [ -n "$1" ]; then if [ -n "$1" ]; then
...@@ -138,23 +139,23 @@ configure () ...@@ -138,23 +139,23 @@ configure ()
append_cache_entry LIBRARY_OUTPUT_PATH PATH "$absolute_builddir/lib" append_cache_entry LIBRARY_OUTPUT_PATH PATH "$absolute_builddir/lib"
fi fi
if [ -d $workdir ]; then if [ -d "$workdir" ]; then
# If a build directory exists, check if it has a CMake cache. # If a build directory exists, check if it has a CMake cache.
if [ -f $workdir/CMakeCache.txt ]; then if [ -f "$workdir/CMakeCache.txt" ]; then
# If the CMake cache exists, delete it so that this configuration # If the CMake cache exists, delete it so that this configuration
# is not tainted by a previous one. # is not tainted by a previous one.
rm -f $workdir/CMakeCache.txt rm -f "$workdir/CMakeCache.txt"
fi fi
else else
mkdir -p $workdir mkdir -p "$workdir"
fi fi
cd $workdir cd "$workdir"
if [ -n "$5" ]; then if [ -n "$5" ]; then
cmake -G "$5" $CMakeCacheEntries $sourcedir cmake -G "$5" $CMakeCacheEntries "$sourcedir"
else else
cmake $CMakeCacheEntries $sourcedir cmake $CMakeCacheEntries "$sourcedir"
fi fi
echo "# This is the command used to configure this build" > config.status echo "# This is the command used to configure this build" > config.status
...@@ -262,13 +263,13 @@ while [ $# -ne 0 ]; do ...@@ -262,13 +263,13 @@ while [ $# -ne 0 ]; do
append_cache_entry CMAKE_BUILD_TYPE STRING $optarg append_cache_entry CMAKE_BUILD_TYPE STRING $optarg
;; ;;
--build-dir=*) --build-dir=*)
builddir=$optarg builddir="$optarg"
;; ;;
--bin-dir=*) --bin-dir=*)
bindir=$optarg bindir="$optarg"
;; ;;
--lib-dir=*) --lib-dir=*)
libdir=$optarg libdir="$optarg"
;; ;;
--dual-build) --dual-build)
dualbuild=1 dualbuild=1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment