CMake: Add ability to just print version string
Vicki Pfau vi@endrift.com
Sun, 22 Jan 2017 14:26:59 -0800
2 files changed,
4 insertions(+),
1 deletions(-)
M
version.cmake
→
version.cmake
@@ -43,7 +43,9 @@ if(NOT GIT_BRANCH)
set(GIT_BRANCH "(unknown)") endif() -if(NOT VERSION_STRING_CACHE OR NOT VERSION_STRING STREQUAL VERSION_STRING_CACHE) +if(DEFINED PRINT_STRING) + message("${${PRINT_STRING}}") +elseif(NOT VERSION_STRING_CACHE OR NOT VERSION_STRING STREQUAL VERSION_STRING_CACHE) set(VERSION_STRING_CACHE ${VERSION_STRING} CACHE STRING "" FORCE) if(CONFIG_FILE AND OUT_FILE)