Files
cmake/Tests/RunCMake/CMP0219/CMP0219-helpers.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

21 lines
600 B
CMake

function(cmp0219_assert_equal actual expected)
if(NOT "${actual}" STREQUAL "${expected}")
message(FATAL_ERROR
"Assertion failed:\n"
" expected=[${expected}]\n"
" actual=[${actual}]")
endif()
endfunction()
function(cmp0219_assert_undefined variable_name)
if(DEFINED ${variable_name})
message(FATAL_ERROR
"Assertion failed:\n"
" ${variable_name} should be undefined\n"
" actual=[${${variable_name}}]")
endif()
endfunction()
set(cmp0219_path_fwd "C:/build_bot/new/temp/vendor")
string(REPLACE "/" "\\" cmp0219_path_native "${cmp0219_path_fwd}")