mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
This was broken by refactoring in commit dab5e6ebb1 (introduce
cm::CMakeString class as helper for string() command, 2025-10-06,
v4.3.0-rc1~510^2~2).
Fixes: #27749
16 lines
387 B
CMake
16 lines
387 B
CMake
|
|
cmake_policy(SET CMP0186 NEW)
|
|
|
|
function(check_output name expected)
|
|
set(output "${${name}}")
|
|
if(NOT output STREQUAL expected)
|
|
message(FATAL_ERROR "\"string(REGEX)\" set ${name} to \"${output}\", expected \"${expected}\"")
|
|
endif()
|
|
endfunction()
|
|
|
|
string(REGEX MATCH ".*" out "abcd;")
|
|
check_output(out "abcd;")
|
|
|
|
string(REGEX MATCHALL "^.*" out "abcd;")
|
|
check_output(out "abcd;")
|