Updated version handling

This commit is contained in:
Guilhem Lavaux 2015-04-07 14:36:47 +02:00
parent 03fce51182
commit f7d6aa9bd3

View File

@ -13,14 +13,18 @@ set(NumPy_FIND_REQUIRED TRUE)
include(${CMAKE_SOURCE_DIR}/FindPyLibs.cmake) include(${CMAKE_SOURCE_DIR}/FindPyLibs.cmake)
include(${CMAKE_SOURCE_DIR}/FindNumPy.cmake) include(${CMAKE_SOURCE_DIR}/FindNumPy.cmake)
get_git_head_revision(HEAD GIT_VER)
option(BUILD_SHARED_LIBS "Build shared libraries." OFF) option(BUILD_SHARED_LIBS "Build shared libraries." OFF)
option(BUILD_STATIC_LIBS "Build static libraries." ON) option(BUILD_STATIC_LIBS "Build static libraries." ON)
option(ENABLE_SHARP "Enable SHARP support." ON) option(ENABLE_SHARP "Enable SHARP support." ON)
option(INTERNAL_HDF5 "Build internal version of HDF5" OFF) option(INTERNAL_HDF5 "Build internal version of HDF5" OFF)
option(INTERNAL_NETCDF "Build internal version of NETCDF" OFF) option(INTERNAL_NETCDF "Build internal version of NETCDF" OFF)
option(INTERNAL_BOOST "Build internal version of BOOST" OFF) option(INTERNAL_BOOST "Build internal version of BOOST" OFF)
option(USE_GIT_VERSION "Use GIT version to pad version number" OFF)
IF(USE_GIT_VERSION)
get_git_head_revision(HEAD GIT_VER)
SET(EXTRA_VERSION "-${GIT_VER}")
ENDIF(USE_GIT_VERSION)
#IF(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) #IF(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
# SET(CosmoTool_local CosmoTool_static) # SET(CosmoTool_local CosmoTool_static)
@ -60,8 +64,8 @@ SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2")
SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "0") SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(CPACK_PACKAGE_VERSION_PATCH "0-${GIT_VER}") SET(CPACK_PACKAGE_VERSION_PATCH "0${EXTRA_VERSION}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${GalaxExplorer_VERSION_MAJOR}.${GalaxExplorer_VERSION_MINOR}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so")
SET(CPACK_SOURCE_IGNORE_FILES SET(CPACK_SOURCE_IGNORE_FILES
"/CVS/;/\\\\.git/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*;/CMakeFiles/;.*\\\\.cmake;Makefile") "/CVS/;/\\\\.git/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*;/CMakeFiles/;.*\\\\.cmake;Makefile")