mirror of
https://github.com/Kitware/CMake.git
synced 2025-07-02 18:22:23 +08:00

Use a function instead of a macro so we do not need an extra layer of backslashes. Use a bracket argument to avoid another layer of extra backslashes.
6 lines
154 B
CMake
6 lines
154 B
CMake
function(check var val)
|
|
if(NOT "${${var}}" STREQUAL "${val}")
|
|
message(SEND_ERROR "${var} is \"${${var}}\", not \"${val}\"")
|
|
endif()
|
|
endfunction()
|