blob: 0091036ce7a93d3f4e7e1804707d29e493b30bc9 [file] [log] [blame] [edit]
# TODO: In the future this should be a policy test, but for now verify version
# variables remain undefined for various configurations.
project(NoVersion LANGUAGES NONE)
foreach(pre "NoVersion_" "PROJECT_" "CMAKE_PROJECT_")
foreach(post "" "_MAJOR" "_MINOR" "_PATCH" "_TWEAK")
if(DEFINED ${pre}VERSION${post})
message(SEND_ERROR "${pre}VERSION${post} is defined when no project version was provided")
endif()
endforeach()
endforeach()
add_subdirectory(VersionSubdir)