Skip to content

Commit

Permalink
Merge pull request #276 from electronic-structure/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
toxa81 authored Oct 3, 2018
2 parents ec4cc32 + 5ee0d6c commit 0883d8f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ include_directories(BEFORE src/SDDK)
# configure version header
exec_program("git" ${CMAKE_CURRENT_SOURCE_DIR}
ARGS "rev-parse HEAD"
OUTPUT_VARIABLE GIT_VERSION_SHA1)
OUTPUT_VARIABLE GIT_VERSION_SHA1
RETURN_VALUE exit_code)
if(exit_code)
set(GIT_VERSION_SHA1 "")
endif()
exec_program("date"
ARGS "+\"%a, %e %b %Y %H:%M:%S\""
OUTPUT_VARIABLE BUILD_DATE)
Expand All @@ -143,7 +147,10 @@ exec_program(
${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe --all"
OUTPUT_VARIABLE GIT_BRANCHNAME
RETURN_VALUE GIT_QUERY_BRANCH)
RETURN_VALUE exit_code)
if(exit_code)
set(GIT_BRANCHNAME "")
endif()
configure_file("${PROJECT_SOURCE_DIR}/src/version.hpp.in" "${PROJECT_BINARY_DIR}/src/version.hpp")
include_directories(BEFORE ${PROJECT_BINARY_DIR}/src)

Expand Down

0 comments on commit 0883d8f

Please sign in to comment.