]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Cleanup, allow to override DEAL_II_PACKAGE_VERSION string from command line
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 13 Mar 2013 14:44:30 +0000 (14:44 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 13 Mar 2013 14:44:30 +0000 (14:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@28882 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/cmake/config/Config.cmake.in
deal.II/cmake/config/Make.global_options.in
deal.II/cmake/setup_deal_ii.cmake
deal.II/source/CMakeLists.txt

index f2edc9f9c7758bc089fc66e69ecc2b89da8da4fa..ef66de36f6ba328b7827529a25a23357bba08525 100644 (file)
@@ -26,8 +26,6 @@
 #                                                                         #
 ###########################################################################
 
-SET(VERSION "8.0.pre")
-
 #
 # General configuration for cmake:
 #
index eac641113bb791bd399e1d98b8d245d7ca664b77..f2a47e8d99e8fea2c22d176eaf8ebb62007820dc 100644 (file)
@@ -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@")
 
index 0b51d139b27b8192c6d4e2ecddc192c56dd56f31..121cdcb01926e3cdbc00cdcdb27dd45b45043c9e 100644 (file)
@@ -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@
 
index 46bdf971b9146e78836f2987cfb51456b2da041f..c576f0d10b4fd59f531dbafc2844dd073b8a1aec 100644 (file)
 # 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}
 #
 
 ###########################################################################
 
 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})
 
 
 ###########################################################################
index d1961a542ac477c450275722f99e07e209a9bb0f..a15c71ee962727e813e4e3934614e136c41cbe7f 100644 (file)
@@ -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}}"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.