mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
Tests: Teach RunCMake.CompileWarningAsError to tolerate -w in environment
This commit is contained in:
1 parent
04b2dfd8be
commit
3df7dd2a12
1 file changed
+9
@@ -1,5 +1,14 @@
|
||||
include(RunCMake)
|
||||
|
||||
# Isolate the following cases from certain flags in the environment.
|
||||
foreach(var IN ITEMS CFLAGS CXXFLAGS)
|
||||
if(DEFINED ENV{${var}})
|
||||
string(REGEX REPLACE "(^| )-w( |$)" " " env_flags "$ENV{${var}}")
|
||||
set(ENV{${var}} "${env_flags}")
|
||||
unset(env_flags)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
function(run_compile_warn test lang extension)
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}_${lang}-build)
|
||||
set(RunCMake_TEST_OUTPUT_MERGE 1)
|
||||
|
||||
Reference in new issue
Block a user