Skip to content

Commit

Permalink
Actually run windows builds in Release mode in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jberkenbilt committed May 21, 2023
1 parent 4bc7b6c commit 2028e35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build-scripts/build-windows
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ unzip doc.zip
unzip qpdf-external-libs-bin.zip

cd build
../cmake-win $tool ci
../cmake-win $tool ci $config
cmake --build . --verbose -j$(nproc) "${cmake_xargs[@]}"
ctest --verbose "${ctest_xargs[@]}"
cpack -G NSIS -C $config
Expand Down
13 changes: 7 additions & 6 deletions cmake-win
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e
whoami=$(basename $0)
tool=$1
mode=$2
config=${3-RelWithDebInfo}

dir=$(realpath --relative-to . $(dirname $0))
if [ "$dir" = "." ]; then
Expand All @@ -12,13 +13,13 @@ fi
declare -a args
case $tool in
msvc)
args=(-DCMAKE_BUILD_TYPE=RelWithDebInfo)
args=(-DCMAKE_BUILD_TYPE=$config)
if cl 2>&1 | grep -q 'for x86'; then
args=("${args[@]}" -A win32)
fi
;;
mingw)
args=(-G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo)
args=(-G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=$config)
;;
*)
echo 1>&2 "Usage: $whoami {msvc|mingw}"
Expand All @@ -36,9 +37,9 @@ cmake "${args[@]}" $dir
set +x
if [ "$tool" = "msvc" ]; then
echo ""
echo "*****************************************************************"
echo "*** Remember to pass --config RelWithDebInfo to cmake --build ***"
echo "*** and -C RelWithDebInfo to ctest ***"
echo "*****************************************************************"
echo "***"
echo "*** Remember to pass --config $config to cmake --build"
echo "*** and -C $config to ctest"
echo "***"
echo ""
fi

0 comments on commit 2028e35

Please sign in to comment.