]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix. Add support for debug and release libraries ^^
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Sep 2012 20:06:39 +0000 (20:06 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Sep 2012 20:06:39 +0000 (20:06 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26610 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_deal_ii.cmake
deal.II/config/CMakeLists.txt
deal.II/config/Config.cmake.in [moved from deal.II/config/deal.IIConfig.cmake.in with 100% similarity]
deal.II/config/ConfigVersion.cmake [moved from deal.II/config/deal.IIConfigVersion.cmake.in with 100% similarity]
deal.II/config/Make.global_options.stub [new file with mode: 0644]
deal.II/source/CMakeLists.txt

index 17c6e1bccd1a14e6945a9d87fb485e2625d62868..9976f74394229ebb6cbdfeb5daf955d021cc4095 100644 (file)
@@ -50,20 +50,24 @@ LIST(APPEND DEAL_II_INCLUDE_DIRS
   )
 
 #
-# TODO: This is decoupled from the actual library target atm...
+# The base name:
 #
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
-  SET(DEAL_II_LIBRARY_NAME "deal_II.g")
+  SET(DEAL_II_BASE_NAME "deal_II.g")
 ELSE()
-  SET(DEAL_II_LIBRARY_NAME "deal_II")
+  SET(DEAL_II_BASE_NAME "deal_II")
 ENDIF()
+
+#
+# The library name:
+#
 IF(BUILD_SHARED_LIBS)
   SET(DEAL_II_LIBRARY_NAME
-    ${CMAKE_SHARED_LIBRARY_PREFIX}deal_II${CMAKE_SHARED_LIBRARY_SUFFIX}
+    ${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
     )
 ELSE()
   SET(DEAL_II_LIBRARY_NAME
-    ${CMAKE_STATIC_LIBRARY_PREFIX}deal_II${CMAKE_STATIC_LIBRARY_SUFFIX}
+    ${CMAKE_STATIC_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
     )
 ENDIF()
 
index 1c77d389ec252cdb3e216cfb6a7cc40cd43465ba..a04c04e069cee8988a395fa28176fd9175209ebd 100644 (file)
@@ -10,28 +10,28 @@ IF(DEAL_II_COMPONENT_PROJECT_CONFIG)
   #
 
   CONFIGURE_FILE(
-    ${CMAKE_CURRENT_SOURCE_DIR}/deal.IIConfig.cmake.in
-    ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
+    ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
+    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}Config.cmake
     )
 
   GET_CMAKE_PROPERTY(res VARIABLES)
   FOREACH(var ${res})
     IF(var MATCHES "DEAL_II_WITH")
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
+      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}Config.cmake
         "SET(${var} ${${var}})\n"
         )
     ENDIF()
   ENDFOREACH()
 
   CONFIGURE_FILE(
-    ${CMAKE_CURRENT_SOURCE_DIR}/deal.IIConfigVersion.cmake.in
-    ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfigVersion.cmake
+    ${CMAKE_CURRENT_SOURCE_DIR}/ConfigVersion.cmake.in
+    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}ConfigVersion.cmake
     @ONLY
     )
 
   INSTALL(FILES
-    ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
-    ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfigVersion.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}Config.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}ConfigVersion.cmake
     DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
     COMPONENT project_config
     )
@@ -65,9 +65,14 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
 
   CONFIGURE_FILE(
     ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
-    ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+    ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options.${CMAKE_BUILD_TYPE}
     )
 
+  CONFIGURE_FILE(
+    ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.stub
+    ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+    COPYONLY)
+
   CONFIGURE_FILE(
     ${CMAKE_CURRENT_SOURCE_DIR}/Version.in
     ${CMAKE_CURRENT_BINARY_DIR}/Version
@@ -75,6 +80,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
 
   INSTALL(FILES
     ${CMAKE_CURRENT_BINARY_DIR}/template-arguments
+    ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options.${CMAKE_BUILD_TYPE}
     ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
     DESTINATION common
     COMPONENT compat_files
diff --git a/deal.II/config/Make.global_options.stub b/deal.II/config/Make.global_options.stub
new file mode 100644 (file)
index 0000000..7362429
--- /dev/null
@@ -0,0 +1,16 @@
+# $Id$
+
+#
+# Compatibility Make.global_options stub file
+#
+
+#
+# Include the correct configuration depending on whether debug-mode is
+# selected, or not:
+#
+
+ifeq ($(debug-mode),on)
+  include Make.global_options.Debug
+else
+  include Make.global_options.Release
+endif
index 3c0628e489b40d418bf69416765bd87d166e0062..ae637ee23c2c7def11426b481225144c920fcf16 100644 (file)
@@ -43,10 +43,9 @@ ADD_LIBRARY(deal_II
 # No point to wrack one's brain over the question whether a new version of
 # a C++ library is still ABI backwards compatible :-]
 #
-SET_TARGET_PROPERTIES(deal_II PROPERTIES
+SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME} PROPERTIES
   VERSION ${VERSION}
   SOVERSION ${VERSION}
-  DEBUG_POSTFIX ".g"
   )
 
 SET_TARGET_PROPERTIES(deal_II PROPERTIES

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.