2018-08-19 15:06:16 +00:00
|
|
|
if(NOT "$ENV{BUILD_ID}" STREQUAL "")
|
|
|
|
set(JENKINS_BUILD_ID $ENV{BUILD_ID})
|
|
|
|
set(JENKINS_BUILD_NUMBER $ENV{BUILD_NUMBER})
|
|
|
|
message(STATUS "running under Jenkins, build-number is ${JENKINS_BUILD_NUMBER}")
|
|
|
|
else()
|
|
|
|
set(JENKINS_BUILD_NUMBER 0)
|
|
|
|
set(JENKINS_BUILD_ID "none")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(Git)
|
2020-08-21 11:12:14 +00:00
|
|
|
if (Git_FOUND)
|
|
|
|
execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir ${SRC}/.git rev-parse HEAD
|
2018-08-19 15:06:16 +00:00
|
|
|
OUTPUT_VARIABLE REVISION
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
message(STATUS "Git revision is ${REVISION}")
|
|
|
|
else()
|
|
|
|
set(REVISION "none")
|
|
|
|
endif()
|
|
|
|
|
2020-08-24 13:32:22 +00:00
|
|
|
configure_file (${SRC}/src/Include/flightgearBuildId.h.cmake-in ${DST})
|