From 54f0fc206f13e2d8ce80f63ecdc984c3cc09269d Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 24 Apr 2020 18:39:01 +0200 Subject: [PATCH] build.sh: need to pass --config flag to cmake build (for multiconfig generators like Visual Studio/xcode) --- build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4988843..679d90f 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,7 @@ eval set -- "$options" ONLY_CONFIG=0 ARGS="" +BUILD_ARGS="--clean-first" while true; do case $1 in @@ -23,6 +24,7 @@ while true; do usage } ARGS="${ARGS} -DCMAKE_BUILD_TYPE=${1}" + BUILD_ARGS="${BUILD_ARGS} --config ${1}" ;; --pkg-type) shift @@ -61,5 +63,5 @@ rm build/CMakeCache.txt 2> /dev/null cmake -B build $ARGS . if [ ${ONLY_CONFIG} -eq 0 ]; then - cmake --build build --clean-first --target ${TARGET} + cmake --build build ${BUILD_ARGS} --target ${TARGET} fi