mirror of https://github.com/CGAL/cgal
Merge pull request #4860 from lrineau/CGAL-CGALConfigVersion__fixes-GF
CGALConfigVersion... fix #4850
This commit is contained in:
commit
c788d66761
|
|
@ -879,6 +879,7 @@ if(NOT CGAL_HEADER_ONLY)
|
|||
else()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake
|
||||
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigBuildVersion.cmake
|
||||
${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigVersion.cmake
|
||||
DESTINATION ${CGAL_INSTALL_CMAKE_DIR})
|
||||
if(NOT CGAL_INSTALL_CMAKE_DIR STREQUAL "${CGAL_INSTALL_LIB_DIR}/cmake/CGAL")
|
||||
|
|
|
|||
|
|
@ -14,5 +14,6 @@ function(cgal_parse_version_h version_h_file name)
|
|||
MATH(EXPR ${ARGV3} "${CMAKE_MATCH_5}") # minor version without leading 0
|
||||
set(${ARGV3} "${${ARGV3}}" PARENT_SCOPE)
|
||||
set(${ARGV4} "${CMAKE_MATCH_6}" PARENT_SCOPE) # patch number
|
||||
set(${ARGV5} "${CMAKE_MATCH_7}" PARENT_SCOPE) # build number
|
||||
MATH(EXPR ${ARGV5} "${CMAKE_MATCH_7}") # build number version without leading 0
|
||||
set(${ARGV5} "${${ARGV5}}" PARENT_SCOPE) # build number
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -161,15 +161,6 @@ cgal_setup_module_path()
|
|||
set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake)
|
||||
include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake)
|
||||
|
||||
include("${CGAL_MODULES_DIR}/CGAL_parse_version_h.cmake")
|
||||
cgal_parse_version_h( "${CGAL_INSTALLATION_PACKAGE_DIR}/include/CGAL/version.h"
|
||||
"CGAL_VERSION_NAME"
|
||||
"CGAL_MAJOR_VERSION"
|
||||
"CGAL_MINOR_VERSION"
|
||||
"CGAL_BUGFIX_VERSION"
|
||||
"CGAL_BUILD_VERSION")
|
||||
set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUGFIX_VERSION}.${CGAL_BUILD_VERSION}")
|
||||
|
||||
if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST )
|
||||
# Do not use -isystem for CGAL include paths
|
||||
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
set(CGAL_BUILD_VERSION 0)
|
||||
|
|
@ -1,6 +1,13 @@
|
|||
set(CGAL_MAJOR_VERSION 5)
|
||||
set(CGAL_MINOR_VERSION 1)
|
||||
set(CGAL_BUGFIX_VERSION 0)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake)
|
||||
if(NOT CMAKE_SCRIPT_MODE_FILE)
|
||||
set(CGAL_MAJOR_VERSION ${CGAL_MAJOR_VERSION} PARENT_SCOPE)
|
||||
set(CGAL_MINOR_VERSION ${CGAL_MINOR_VERSION} PARENT_SCOPE)
|
||||
set(CGAL_BUGFIX_VERSION ${CGAL_BUGFIX_VERSION} PARENT_SCOPE)
|
||||
set(CGAL_BUILD_VERSION ${CGAL_BUILD_VERSION} PARENT_SCOPE)
|
||||
endif()
|
||||
set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.1-beta2")
|
||||
set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}")
|
||||
|
||||
|
|
|
|||
|
|
@ -182,6 +182,8 @@ string(REPLACE "CGAL_VERSION ${CGAL_VERSION_INPUT}" "CGAL_VERSION ${CGAL_VERSION
|
|||
# update CGAL_VERSION_NR
|
||||
if (CGAL_VERSION_NR)
|
||||
string(REGEX REPLACE "CGAL_VERSION_NR 10[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" "CGAL_VERSION_NR ${CGAL_VERSION_NR}" file_content "${file_content}")
|
||||
math(EXPR CGAL_BUILD_VERSION "${CGAL_VERSION_NR} % 10000")
|
||||
file(WRITE ${release_dir}/lib/cmake/CGAL/CGALConfigBuildVersion.cmake "set(CGAL_BUILD_VERSION ${CGAL_BUILD_VERSION})")
|
||||
endif()
|
||||
file(WRITE ${release_dir}/include/CGAL/version.h "${file_content}")
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ SOURCES_DIR="$PWD" # Directory containing the sources, default is "$PWD"
|
|||
VERBOSE="" # Verbose mode (displays log to standard err)
|
||||
BETA="" #If set, will change the release number and version number accordingly.
|
||||
DESTINATION="$PWD"
|
||||
IS_MASTER="y"
|
||||
INTEGRATION=""
|
||||
|
||||
SOURCES_DIR_HAS_BEEN_SET=
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ usage() {
|
|||
printerr ' --beta <n> : followed by a number. When used with --public, will modify
|
||||
the release number and the release version name to include beta<n>'
|
||||
printerr ' --dest : followed by the path to where the release should be created. Default is /tmp.'
|
||||
printerr ' --is_master : replace the Ic in the name by I.'
|
||||
printerr ' --integration : replace the I in the name by Ic.'
|
||||
printerr ' <packages dir> : the directory containing the packages [default is trunk]'
|
||||
}
|
||||
|
||||
|
|
@ -103,8 +103,8 @@ while [ $1 ]; do
|
|||
DESTINATION=$1
|
||||
shift;continue
|
||||
;;
|
||||
--is_master)
|
||||
IS_MASTER="y"
|
||||
--integration)
|
||||
INTEGRATION="y"
|
||||
shift;continue
|
||||
;;
|
||||
-*)
|
||||
|
|
@ -116,9 +116,9 @@ while [ $1 ]; do
|
|||
SOURCES_DIR="$1"
|
||||
SOURCES_DIR_HAS_BEEN_SET=y
|
||||
shift; continue
|
||||
elif [ -n "$IS_MASTER" ]; then
|
||||
elif [ -z "$INTEGRATION" ]; then
|
||||
# Compatibility with the old syntax with candidates
|
||||
IS_MASTER=""
|
||||
INTEGRATION="y"
|
||||
shift; continue
|
||||
else
|
||||
printerr "Unrecognized option : $1"
|
||||
|
|
@ -206,7 +206,7 @@ if [ -z "$INTERNAL_NUMBER" ]; then
|
|||
INTERNAL_NUMBER=1
|
||||
fi
|
||||
|
||||
if [ -z "${IS_MASTER}" ]; then
|
||||
if [ -n "${INTEGRATION}" ]; then
|
||||
INTERNAL_STRING="-Ic-${INTERNAL_NUMBER}"
|
||||
else
|
||||
INTERNAL_STRING="-I-${INTERNAL_NUMBER}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue