Skip to content

Commit

Permalink
build: detect non-git working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kanru committed Jul 4, 2024
1 parent f3d90ea commit 2ffbf00
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 @@ -20,8 +20,11 @@ if(Git_FOUND)
COMMAND ${GIT_EXECUTABLE} --work-tree ${CMAKE_SOURCE_DIR} describe --dirty --always
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE GIT_DESCRIBE
ERROR_VARIABLE GIT_DESCRIBE_ERROR
)
string(REPLACE "v" "" PRJ_VER ${GIT_DESCRIBE})
if(NOT GIT_DESCRIBE_ERROR)
string(REPLACE "v" "" PRJ_VER ${GIT_DESCRIBE})
endif()
endif()

set(PRJ_DESCRIPTION
Expand Down

0 comments on commit 2ffbf00

Please sign in to comment.