From 56967077ef8e266d8d96bf2678c825de22f767c9 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 13 Mar 2013 14:44:30 +0000 Subject: [PATCH] CMake: Cleanup, allow to override DEAL_II_PACKAGE_VERSION string from command line git-svn-id: https://svn.dealii.org/trunk@28882 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CMakeLists.txt | 2 -- deal.II/cmake/config/Config.cmake.in | 2 +- deal.II/cmake/config/Make.global_options.in | 2 +- deal.II/cmake/setup_deal_ii.cmake | 11 ++++++----- deal.II/source/CMakeLists.txt | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index f2edc9f9c7..ef66de36f6 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -26,8 +26,6 @@ # # ########################################################################### -SET(VERSION "8.0.pre") - # # General configuration for cmake: # diff --git a/deal.II/cmake/config/Config.cmake.in b/deal.II/cmake/config/Config.cmake.in index eac641113b..f2a47e8d99 100644 --- a/deal.II/cmake/config/Config.cmake.in +++ b/deal.II/cmake/config/Config.cmake.in @@ -27,7 +27,7 @@ SET(DEAL_II_PACKAGE_NAME "@DEAL_II_PACKAGE_NAME@") SET(DEAL_II_PACKAGE_VERSION "@DEAL_II_PACKAGE_VERSION@") -SET(DEAL_II_VERSION "@DEAL_II_VERSION_MAJOR@.@DEAL_II_VERSION_MINOR@") +SET(DEAL_II_VERSION "@DEAL_II_VERSION@") SET(DEAL_II_VERSION_MAJOR "@DEAL_II_VERSION_MAJOR@") SET(DEAL_II_VERSION_MINOR "@DEAL_II_VERSION_MINOR@") diff --git a/deal.II/cmake/config/Make.global_options.in b/deal.II/cmake/config/Make.global_options.in index 0b51d139b2..121cdcb019 100644 --- a/deal.II/cmake/config/Make.global_options.in +++ b/deal.II/cmake/config/Make.global_options.in @@ -35,7 +35,7 @@ LIBDIR = @CMAKE_INSTALL_PREFIX@/@DEAL_II_LIBRARY_RELDIR@ enable-threads = @MAKEFILE_enablethreads@ enable-shared = @MAKEFILE_enableshared@ enable-parser = @MAKEFILE_enableparser@ -DEAL_II_VERSION = @VERSION@ +DEAL_II_VERSION = @DEAL_II_PACKAGE_VERSION@ DEAL_II_MAJOR = @DEAL_II_VERSION_MAJOR@ DEAL_II_MINOR = @DEAL_II_VERSION_MINOR@ diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake index 46bdf971b9..c576f0d10b 100644 --- a/deal.II/cmake/setup_deal_ii.cmake +++ b/deal.II/cmake/setup_deal_ii.cmake @@ -25,9 +25,10 @@ # General information about deal.II: # # DEAL_II_PACKAGE_NAME *) -# DEAL_II_PACKAGE_VERSION **) +# DEAL_II_PACKAGE_VERSION *) # DEAL_II_VERSION_MAJOR # DEAL_II_VERSION_MINOR +# DEAL_II_VERSION # # Information about paths, install locations and names: # @@ -53,7 +54,6 @@ # DEAL_II_WITH_DOC_DIRECTORY # # *) Can be overwritten by the command line via -D<...> -# **) Will be set with to the value of ${VERSION} # ########################################################################### @@ -64,14 +64,15 @@ SET_IF_EMPTY(DEAL_II_PACKAGE_NAME "deal.II") -SET(DEAL_II_PACKAGE_VERSION ${VERSION}) +SET_IF_EMPTY(DEAL_II_PACKAGE_VERSION "8.0.pre") # TODO: Get this value from somewhere else STRING(REGEX REPLACE - "^([0-9]+)\\..*" "\\1" DEAL_II_VERSION_MAJOR "${VERSION}" + "^([0-9]+)\\..*" "\\1" DEAL_II_VERSION_MAJOR "${DEAL_II_PACKAGE_VERSION}" ) STRING(REGEX REPLACE - "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_VERSION_MINOR "${VERSION}" + "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_VERSION_MINOR "${DEAL_II_PACKAGE_VERSION}" ) +SET(DEAL_II_VERSION ${DEAL_II_VERSION_MAJOR}.${DEAL_II_VERSION_MINOR}) ########################################################################### diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt index d1961a542a..a15c71ee96 100644 --- a/deal.II/source/CMakeLists.txt +++ b/deal.II/source/CMakeLists.txt @@ -57,13 +57,13 @@ FOREACH(build ${DEAL_II_BUILD_TYPES}) SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} PROPERTIES - VERSION ${VERSION} + VERSION "${DEAL_II_PACKAGE_VERSION}" # # Sonaming: Well... we just use the version number. # No point to wrack one's brain over the question whether a new version of # a C++ library is still ABI backwards compatible :-] # - SOVERSION ${VERSION} + SOVERSION "${DEAL_II_PACKAGE_VERSION}" LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_${build}}" COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}" COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}" -- 2.39.5