Skip to content
Snippets Groups Projects
Commit 46c89c77 authored by Brad King's avatar Brad King
Browse files

gitlab-ci: Rename CI config variable to avoid conflict with CMAKE_BUILD_TYPE

Since commit e216b9bb (cmake: Allow CMAKE_BUILD_TYPE to be set by
environment variable, 2021-06-29), the `CMAKE_BUILD_TYPE` environment
variable is interpreted by CMake, and can affect the test suite.
Rename our CI config variable to avoid conflict.
parent 3ede66e1
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,8 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "ON" CACHE BOOL "")
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "")
set(CMake_TEST_INSTALL "OFF" CACHE BOOL "")
if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "")
if (NOT "$ENV{CMAKE_CI_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "$ENV{CMAKE_CI_BUILD_TYPE}" CACHE STRING "")
endif ()
if (NOT configure_no_sccache)
......
......@@ -26,8 +26,8 @@ set(CTEST_SITE "gitlab-ci")
set(ctest_model "Experimental")
# Default to Release builds.
if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_BUILD_TYPE}")
if (NOT "$ENV{CMAKE_CI_BUILD_TYPE}" STREQUAL "")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CI_BUILD_TYPE}")
endif ()
if (NOT CTEST_BUILD_CONFIGURATION)
set(CTEST_BUILD_CONFIGURATION "Release")
......
......@@ -90,7 +90,7 @@
variables:
CMAKE_CONFIGURATION: fedora34_clang_analyzer
CMAKE_BUILD_TYPE: Debug
CMAKE_CI_BUILD_TYPE: Debug
CTEST_NO_WARNINGS_ALLOWED: 1
CMake_SKIP_INSTALL: 1
......@@ -168,7 +168,7 @@
.fedora_memcheck:
variables:
CMAKE_BUILD_TYPE: RelWithDebInfo
CMAKE_CI_BUILD_TYPE: RelWithDebInfo
.fedora_asan_addon:
extends: .fedora_memcheck
......
......@@ -28,7 +28,7 @@
# Debug and RelWithDebinfo build types use the `/Zi` which results in
# uncacheable compiations.
# https://github.com/mozilla/sccache/issues/242
CMAKE_BUILD_TYPE: Release
CMAKE_CI_BUILD_TYPE: Release
CTEST_NO_WARNINGS_ALLOWED: 1
.windows_vs2019_x64_ninja:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment