only strip string if not empty
This commit is contained in:
parent
4c360122c8
commit
0c61c54b73
@ -42,8 +42,11 @@ if(GIT_FOUND)
|
||||
OUTPUT_VARIABLE _git_branch
|
||||
ERROR_QUIET
|
||||
)
|
||||
|
||||
if(_git_branch)
|
||||
string(STRIP ${_git_branch} _git_branch)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# CMAKE_CURRENT_LIST_DIR is undefined in CMake 2.8.2
|
||||
# see https://public.kitware.com/Bug/print_bug_page.php?bug_id=11675
|
||||
|
Loading…
x
Reference in New Issue
Block a user