Files
CMake/Tests/RunCMake/InitialFlags/C.cmake
Brad King 3953dfcb31 Restore support for backslashes in initial language-wide flags
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
2021-04-07 13:53:22 -04:00

4 lines
110 B
CMake

set(CMAKE_C_FLAGS_INIT [[-Dvar="b\c"]])
enable_language(C)
message(STATUS "CMAKE_C_FLAGS='${CMAKE_C_FLAGS}'")