9d9f616792
This expression evaluates to '1' or '0' to indicate whether the build configuration for which the expression is evaluated matches tha named configuration. In combination with the "$<0:...>" and "$<1:...>" expressions this allows per-configuration content to be generated.
26 lines
595 B
CMake
26 lines
595 B
CMake
macro(check var val)
|
|
if(NOT "${${var}}" STREQUAL "${val}")
|
|
message(SEND_ERROR "${var} is \"${${var}}\", not \"${val}\"")
|
|
endif()
|
|
endmacro()
|
|
|
|
message(STATUS "config=[${config}]")
|
|
check(test_0 "")
|
|
check(test_1 "content")
|
|
check(test_and_0 "0")
|
|
check(test_and_0_0 "0")
|
|
check(test_and_0_1 "0")
|
|
check(test_and_1 "1")
|
|
check(test_and_1_0 "0")
|
|
check(test_and_1_1 "1")
|
|
check(test_config_0 "0")
|
|
check(test_config_1 "1")
|
|
check(test_not_0 "1")
|
|
check(test_not_1 "0")
|
|
check(test_or_0 "0")
|
|
check(test_or_0_0 "0")
|
|
check(test_or_0_1 "1")
|
|
check(test_or_1 "1")
|
|
check(test_or_1_0 "1")
|
|
check(test_or_1_1 "1")
|