|
@@ -99,7 +99,7 @@ option(RUNTIME_USER "Set the runtime username")
|
|
|
option(RUNTIME_GROUP "Set the runtime group")
|
|
|
option(ENV_XML_FILE "Set the environment xml file name.")
|
|
|
option(ENV_CONF_FILE "Set the environment conf file name.")
|
|
|
-option(LICENSE_FILE "Set the liscense file to use.")
|
|
|
+option(LICENSE_FILE "Set the license file to use.")
|
|
|
|
|
|
if( NOT LICENSE_FILE )
|
|
|
set(LICENSE_FILE "LICENSE.txt")
|
|
@@ -219,6 +219,33 @@ set(CPACK_SOURCE_IGNORE_FILES
|
|
|
## config files.
|
|
|
###
|
|
|
set( BUILD_TAG "${CPACK_RPM_PACKAGE_VERSION}_${CPACK_RPM_PACKAGE_RELEASE}-${stagever}")
|
|
|
+if (USE_GIT_DESCRIBE OR CHECK_GIT_TAG)
|
|
|
+ execute_process(COMMAND "${GIT_COMMAND}" describe --exact --tags --dirty
|
|
|
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
+ OUTPUT_VARIABLE GIT_BUILD_TAG
|
|
|
+ ERROR_QUIET
|
|
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
+ if (CHECK_GIT_TAG)
|
|
|
+ if(NOT "${GIT_BUILD_TAG}" STREQUAL "${BUILD_TAG}")
|
|
|
+ message(FATAL_ERROR "Git tag ${GIT_BUILD_TAG} does not match source version ${BUILD_TAG}" )
|
|
|
+ endif()
|
|
|
+ else()
|
|
|
+ if ("${GIT_BUILD_TAG}" STREQUAL "")
|
|
|
+ execute_process(COMMAND "${GIT_COMMAND}" describe --always --tags --all --abbrev=6 --dirty --long
|
|
|
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
+ OUTPUT_VARIABLE GIT_BUILD_TAG
|
|
|
+ ERROR_QUIET
|
|
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
+ endif()
|
|
|
+ endif()
|
|
|
+ message ("-- Git tag is '${GIT_BUILD_TAG}'")
|
|
|
+ if(NOT "${GIT_BUILD_TAG}" STREQUAL "${BUILD_TAG}")
|
|
|
+ if(NOT "${GIT_BUILD_TAG}" STREQUAL "") # probably means being built from a tarball...
|
|
|
+ set( BUILD_TAG "${BUILD_TAG}[${GIT_BUILD_TAG}]")
|
|
|
+ endif()
|
|
|
+ endif()
|
|
|
+endif()
|
|
|
+message ("-- Build tag is '${BUILD_TAG}'")
|
|
|
configure_file(${HPCC_SOURCE_DIR}/build-config.h.cmake "build-config.h" )
|
|
|
|
|
|
#set( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
|