Skip to content

Commit

Permalink
Update cmake for git version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Jun 5, 2024
1 parent 461aded commit 81ceb3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ if (ENABLE_GIT_VERSION)
find_package(Git)
gitGetVersion(${CMAKE_CURRENT_SOURCE_DIR} proxy)
set(VERSION_GIT ${proxy_WC_REVISION_HASH})
string(TIMESTAMP PVERSION "${VERSION_GIT} (%Y-%m-%d %H:%M:%S)")
if (${VERSION_GIT} STREQUAL "")
string(TIMESTAMP PVERSION "(%Y-%m-%d %H:%M:%S)")
else()
string(TIMESTAMP PVERSION "${VERSION_GIT} (%Y-%m-%d %H:%M:%S)")
endif()
message(STATUS "Git Version: ${PVERSION}")
endif()

Expand Down

0 comments on commit 81ceb3c

Please sign in to comment.