1 2 3 4 5
function(check var val) if(NOT "${${var}}" STREQUAL "${val}") message(SEND_ERROR "${var} is \"${${var}}\", not \"${val}\"") endif() endfunction()