Skip to content

Commit

Permalink
GHA/windows: drop no-op -DCMAKE_BUILD_TYPE= from MSVC jobs
Browse files Browse the repository at this point in the history
They use Visual Studio generators, which are multi-target.
The build command does the Release/Debug selection via `--config`.

Also:
- appveyor: drop unnecessary conditional for 3 options.
  To sync with GHA.
- appveyor: drop unused `-DCMAKE_INSTALL_PREFIX=`.
  To sync with GHA.
- sync cmake option order between GHA and appveyor.

Closes curl#16372
  • Loading branch information
vszakats committed Feb 18, 2025
1 parent 24ffcba commit 61f85bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,12 @@ jobs:
-DCMAKE_EXE_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \
-DCMAKE_SHARED_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \
-DCMAKE_VS_GLOBALS="TrackFileAccess=false${vsglobals}" \
-DCMAKE_BUILD_TYPE='${{ matrix.type }}' \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE= \
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
-DBUILD_SHARED_LIBS=OFF \
-DENABLE_DEBUG=ON \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE= \
${{ matrix.config }}
done
if [ -d bld_chkprefill ] && ! diff -u bld/lib/curl_config.h bld_chkprefill/lib/curl_config.h; then
Expand Down
22 changes: 10 additions & 12 deletions appveyor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,21 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
[ -n "${TOOLSET:-}" ] && options+=" -T ${TOOLSET}"
[ "${OPENSSL}" = 'ON' ] && options+=" -DOPENSSL_ROOT_DIR=${openssl_root_win}"
[ -n "${CURLDEBUG:-}" ] && options+=" -DENABLE_CURLDEBUG=${CURLDEBUG}"
[ "${PRJ_CFG}" = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
[ "${PRJ_CFG}" = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
[[ "${PRJ_GEN}" = *'Visual Studio'* ]] && options+=' -DCMAKE_VS_GLOBALS=TrackFileAccess=false'
# shellcheck disable=SC2086
cmake -B "_bld${_chkprefill}" -G "${PRJ_GEN}" ${TARGET} \
-DCURL_USE_OPENSSL="${OPENSSL}" \
-DCURL_USE_SCHANNEL="${SCHANNEL}" \
-DHTTP_ONLY="${HTTP_ONLY}" \
-DBUILD_SHARED_LIBS="${SHARED}" \
-DCMAKE_UNITY_BUILD="${UNITY}" \
-DCURL_TEST_BUNDLES=ON \
-DCMAKE_VS_GLOBALS=TrackFileAccess=false \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE= \
-DCMAKE_UNITY_BUILD="${UNITY}" -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
-DBUILD_SHARED_LIBS="${SHARED}" \
-DENABLE_DEBUG="${DEBUG}" \
-DENABLE_UNICODE="${ENABLE_UNICODE}" \
-DCMAKE_INSTALL_PREFIX='C:/curl' \
-DCMAKE_BUILD_TYPE="${PRJ_CFG}" \
-DCURL_USE_LIBPSL=OFF ${options}
-DHTTP_ONLY="${HTTP_ONLY}" \
-DCURL_USE_SCHANNEL="${SCHANNEL}" \
-DCURL_USE_OPENSSL="${OPENSSL}" \
-DCURL_USE_LIBPSL=OFF \
${options}
done
if [ -d _bld_chkprefill ] && ! diff -u _bld/lib/curl_config.h _bld_chkprefill/lib/curl_config.h; then
cat _bld_chkprefill/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
Expand Down

0 comments on commit 61f85bf

Please sign in to comment.