mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
Refactoring in commit bdc40742bd (CMakeDetermineCompilerId: Test without
COMPILER_ID_FLAGS if REQUIRE_SUCCESS, 2021-02-27, v3.20.0-rc3~6^2) added
an extra macro layer through which flag strings are passed. That caused
an extra level of argument re-parsing, and broke flags with backslashes.
Pass flags to the helper macro through variable names instead.
Fixes: #22041
8 lines
146 B
CMake
8 lines
146 B
CMake
include(RunCMake)
|
|
|
|
set(ENV{CFLAGS} "$ENV{CFLAGS} -Denv=\"a\\b\"")
|
|
run_cmake(C)
|
|
|
|
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -Denv=\"a\\b\"")
|
|
run_cmake(CXX)
|