Skip to content

Commit 31c48a0

Browse files
committed
fix travis
1 parent 0e090cd commit 31c48a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ string(REGEX REPLACE "^[^.]*\\.[^.]*\\.([0-9]*).*" "\\1" VERSION_PATCH ${VERSION
4848
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
4949
execute_process(COMMAND git describe --abbrev=4
5050
OUTPUT_VARIABLE GIT_REV)
51-
string(REGEX REPLACE "\n$" "" PACKAGE_VERSION "${GIT_REV}")
52-
else()
51+
string(REGEX REPLACE "\n$" "" PACKAGE_VERSION "${GIT_REV}")
52+
endif()
53+
if(NOT EXISTS ${PACKAGE_VERSION})
5354
set(PACKAGE_VERSION ${VERSION_PLAIN})
5455
endif()
5556

0 commit comments

Comments
 (0)