Files
cmake/Tests/RunCMake/CMP0219/CheckCSourceCompiles-NEW.cmake
T
Alex Reinking 9d2e85373a macro: Add policy to preserve backslashes in arguments
Preserve backslashes in arguments passed to macros by re-escaping
them before substituting in the macro body, where they will be
parsed again.

Fixes: #19281, #22157, #23641, #25803, #27645, #20891
2026-05-31 14:36:15 -04:00

9 lines
255 B
CMake

cmake_policy(SET CMP0219 NEW)
enable_language(C)
include(CheckCSourceCompiles)
check_c_source_compiles("int main() { return '\\0'; }" RESULT)
if(NOT RESULT)
message(FATAL_ERROR "check_c_source_compiles failed for escaped NUL character source")
endif()