CMake/Tests/RunCMake/CMP0064/CMP0064-OLD.cmake
Matt McCormick 14e49ed156 if: Add "TEST <test>" condition
if(TEST TestNameThatExists) will return true if a test with the name
TestNameThatExists has been added with add_test.  The syntax is similar
to if(TARGET TargetName).  Since use of "TEST" as an argument to if()
could previously be interpreted as a non-keyword argument, add policy
CMP0064 to treat it as a keyword as NEW behavior.
2015-08-03 09:22:25 -04:00

8 lines
171 B
CMake

cmake_policy(SET CMP0064 OLD)
if(TEST)
message(FATAL_ERROR "TEST was not recognized to be undefined")
else()
message(STATUS "TEST was treated as a variable")
endif()