mirror of https://github.com/AlexeyAB/darknet.git
switch debug/release build order, better futureproof for next cmakeTargets work
This commit is contained in:
parent
40cdaaaa43
commit
8fd3e7ad25
14
build.ps1
14
build.ps1
|
@ -48,19 +48,19 @@ if ($null -eq (Get-Command "cl.exe" -ErrorAction SilentlyContinue)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Test-Path $vcpkg_path) {
|
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
|
# RELEASE
|
||||||
New-Item -Path .\build_win_release -ItemType directory -Force
|
New-Item -Path .\build_win_release -ItemType directory -Force
|
||||||
Set-Location build_win_release
|
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 -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
|
cmake --build . --config Release --parallel ${number_of_build_workers} --target install
|
||||||
Set-Location ..
|
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 {
|
else {
|
||||||
# USE LOCAL PTHREAD LIB, NO VCPKG, ONLY RELEASE
|
# USE LOCAL PTHREAD LIB, NO VCPKG, ONLY RELEASE
|
||||||
|
|
16
build.sh
16
build.sh
|
@ -2,14 +2,6 @@
|
||||||
|
|
||||||
number_of_build_workers=8
|
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
|
# RELEASE
|
||||||
mkdir -p build_release
|
mkdir -p build_release
|
||||||
cd 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 -- -j${number_of_build_workers}
|
||||||
#cmake --build . --target install --parallel ${number_of_build_workers} #valid only for CMake 3.12+
|
#cmake --build . --target install --parallel ${number_of_build_workers} #valid only for CMake 3.12+
|
||||||
cd ..
|
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 ..
|
||||||
|
|
Loading…
Reference in New Issue