Skip to content

Commit

Permalink
Update project version to latest git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ak5k committed Jan 3, 2024
1 parent 7dba3f0 commit 31730c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ if(GIT_FOUND)
)
string(REGEX REPLACE "[^0-9.]" "" GIT_LATEST_TAG ${GIT_LATEST_TAG})
# Set the project version to the latest git tag
project(${PROJECT_NAME} VERSION ${GIT_LATEST_TAG} LANGUAGES C CXX)
if(NOT "${GIT_LATEST_TAG}" STREQUAL "")
# Set the project version to the latest git tag
project(${PROJECT_NAME} VERSION ${GIT_LATEST_TAG} LANGUAGES C CXX)
endif()
endif()
message("Project version: ${PROJECT_VERSION}")

Expand Down

0 comments on commit 31730c3

Please sign in to comment.