mirror of https://gitee.com/bigwinds/arangodb
Cleanup cmake process so it doesn't barf on problems to detect the git version.
This commit is contained in:
parent
53f5926d32
commit
f598efe6e0
|
@ -132,9 +132,14 @@ if (DEFINED GIT_EXE AND IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
|
|||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND ${GIT_EXE} describe --all --tags --long --dirty=-dirty
|
||||
OUTPUT_VARIABLE GIT_OUTPUT)
|
||||
string(STRIP ${GIT_OUTPUT} REPOSITORY_VERSION)
|
||||
set(ARANGODB_BUILD_REPOSITORY ${REPOSITORY_VERSION})
|
||||
set(HAVE_ARANGODB_BUILD_REPOSITORY "1")
|
||||
if (NOT GIT_OUTPUT)
|
||||
set(ARANGODB_BUILD_REPOSITORY "GIT FAILED TO RETRIEVE THE VERSION")
|
||||
set(HAVE_ARANGODB_BUILD_REPOSITORY "1")
|
||||
else()
|
||||
string(STRIP ${GIT_OUTPUT} REPOSITORY_VERSION)
|
||||
set(ARANGODB_BUILD_REPOSITORY ${REPOSITORY_VERSION})
|
||||
set(HAVE_ARANGODB_BUILD_REPOSITORY "1")
|
||||
endif()
|
||||
else ()
|
||||
set(ARANGODB_BUILD_REPOSITORY "")
|
||||
set(HAVE_ARANGODB_BUILD_REPOSITORY "0")
|
||||
|
@ -889,3 +894,5 @@ endif()
|
|||
add_custom_target(packages
|
||||
DEPENDS ${PACKAGES_LIST}
|
||||
)
|
||||
|
||||
message(INFO "Building for git revision: ${ARANGODB_BUILD_REPOSITORY}")
|
||||
|
|
|
@ -113,8 +113,8 @@ configure_file (
|
|||
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
foreach (_variableName ${_variableNames})
|
||||
message(STATUS "${_variableName}=${${_variableName}}")
|
||||
endforeach()
|
||||
#get_cmake_property(_variableNames VARIABLES)
|
||||
#foreach (_variableName ${_variableNames})
|
||||
# message(STATUS "${_variableName}=${${_variableName}}")
|
||||
#endforeach()
|
||||
#--------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue