diff --git a/CMakeLists.txt b/CMakeLists.txt index 236bd08..9ac3f9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parse set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local) set(META_VERSION_MAJOR 5) set(META_VERSION_MINOR 6) -set(META_VERSION_PATCH 0) +set(META_VERSION_PATCH 1) # find required 3rd party libraries include(3rdParty) diff --git a/cmake/modules/BasicConfig.cmake b/cmake/modules/BasicConfig.cmake index f3ac676..74cc113 100644 --- a/cmake/modules/BasicConfig.cmake +++ b/cmake/modules/BasicConfig.cmake @@ -167,9 +167,9 @@ endif () set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}) option( APPEND_GIT_REVISION - "whether the build script should attempt to append the git revision and latest commit to the version displayed via --help" + "whether the build script should attempt to append the Git revision and latest commit to the version displayed via --help" ON) -if (APPEND_GIT_REVISION) +if (APPEND_GIT_REVISION AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" OR EXISTS "${CMAKE_SOURCE_DIR}/.git")) find_program(GIT_BIN git) execute_process( COMMAND ${GIT_BIN} rev-list --count HEAD