Handle CMakeArgs correctly
authorJuergen Hoetzel <juergen@archlinux.org>
Fri, 19 Feb 2016 14:38:24 +0000 (15:38 +0100)
committerJuergen Hoetzel <juergen@archlinux.org>
Sat, 20 Feb 2016 09:54:59 +0000 (10:54 +0100)
CMakeArgs were not passed correctly to (included initial whitespace).
Also unquote CMakeArgs to allow us to pass multiple cmake arguments.

src/pal/tools/gen-buildsys-clang.sh

index 89caf32..1d61944 100755 (executable)
@@ -61,7 +61,7 @@ for i in "${@:5}"; do
       generator=Ninja
       ;;
       *)
-      __UnprocessedCMakeArgs="$__UnprocessedCMakeArgs $i"
+      __UnprocessedCMakeArgs="${__UnprocessedCMakeArgs}${__UnprocessedCMakeArgs:+ }$i"
     esac
 done
 
@@ -147,5 +147,5 @@ cmake \
   "-DCMAKE_EXPORT_COMPILE_COMMANDS=1 " \
   "-DCLR_CMAKE_BUILD_TESTS=$build_tests" \
   $cmake_extra_defines \
-  "$__UnprocessedCMakeArgs" \
+  $__UnprocessedCMakeArgs \
   "$1"