ci: Enable assertions in CMake build job on Windows

Since commit 5b564c371e (gitlab-ci: add Windows infrastructure,
2020-05-20, v3.18.0-rc1~102^2~1) we build with the `Release`
configuration on Windows to avoid the `-Zi` flag.  However, that also
compiles with `-DNDEBUG` by default, thus suppressing assertions.
Since the build is meant for testing, enable assertions again.
This commit is contained in:
Brad King 2024-12-19 11:35:52 -05:00
parent c8c1c9beb8
commit bec34592a6

View File

@ -14,6 +14,10 @@ set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STR
set(CMake_TEST_TLS_VERSION "1.2" CACHE STRING "")
set(CMake_TEST_TLS_VERSION_URL_BAD "https://badtls-v1-1.kitware.com:8011" CACHE STRING "")
# Release flags without -DNDEBUG so we get assertions.
set(CMAKE_C_FLAGS_RELEASE "-O2 -Ob2" CACHE STRING "")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Ob2" CACHE STRING "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_wix_common.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common_ninja.cmake")