From 8fd3e7ad25e62ffbe8daa5f1c29e53dcd68e7215 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Sun, 3 Mar 2019 23:35:38 +0100 Subject: [PATCH] switch debug/release build order, better futureproof for next cmakeTargets work --- build.ps1 | 14 +++++++------- build.sh | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build.ps1 b/build.ps1 index e2657061..c6590a9b 100755 --- a/build.ps1 +++ b/build.ps1 @@ -48,19 +48,19 @@ if ($null -eq (Get-Command "cl.exe" -ErrorAction SilentlyContinue)) { } if (Test-Path $vcpkg_path) { - # DEBUG - New-Item -Path .\build_win_debug -ItemType directory -Force - Set-Location build_win_debug - cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_path\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$vcpkg_triplet" "-DCMAKE_BUILD_TYPE=Debug" $shared_lib .. - cmake --build . --config Debug --parallel ${number_of_build_workers} --target install - Set-Location .. - # RELEASE New-Item -Path .\build_win_release -ItemType directory -Force Set-Location build_win_release cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_path\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$vcpkg_triplet" "-DCMAKE_BUILD_TYPE=Release" $shared_lib .. cmake --build . --config Release --parallel ${number_of_build_workers} --target install Set-Location .. + + # DEBUG + New-Item -Path .\build_win_debug -ItemType directory -Force + Set-Location build_win_debug + cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_path\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$vcpkg_triplet" "-DCMAKE_BUILD_TYPE=Debug" $shared_lib .. + cmake --build . --config Debug --parallel ${number_of_build_workers} --target install + Set-Location .. } else { # USE LOCAL PTHREAD LIB, NO VCPKG, ONLY RELEASE diff --git a/build.sh b/build.sh index aa6f9eda..6fc39302 100755 --- a/build.sh +++ b/build.sh @@ -2,14 +2,6 @@ number_of_build_workers=8 -# DEBUG -mkdir -p build_debug -cd build_debug -cmake .. -DCMAKE_BUILD_TYPE=Debug -cmake --build . --target install -- -j${number_of_build_workers} -#cmake --build . --target install --parallel ${number_of_build_workers} #valid only for CMake 3.12+ -cd .. - # RELEASE mkdir -p build_release cd build_release @@ -17,3 +9,11 @@ cmake .. -DCMAKE_BUILD_TYPE=Release cmake --build . --target install -- -j${number_of_build_workers} #cmake --build . --target install --parallel ${number_of_build_workers} #valid only for CMake 3.12+ cd .. + +# DEBUG +mkdir -p build_debug +cd build_debug +cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake --build . --target install -- -j${number_of_build_workers} +#cmake --build . --target install --parallel ${number_of_build_workers} #valid only for CMake 3.12+ +cd ..