]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make Wolfgang happy #4
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2012 19:37:34 +0000 (19:37 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2012 19:37:34 +0000 (19:37 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26680 0785d39b-7218-0410-832d-ea1e28bc413d

16 files changed:
deal.II/cmake/configure/configure_1_tbb.cmake
deal.II/cmake/configure/configure_boost.cmake
deal.II/cmake/configure/configure_trilinos.cmake
deal.II/cmake/macros/macro_deal_ii_add_dependencies.cmake [new file with mode: 0644]
deal.II/cmake/macros/macro_deal_ii_add_library.cmake [new file with mode: 0644]
deal.II/cmake/macros/macro_expand_instantiations.cmake
deal.II/cmake/setup_compiler_flags_gnu.cmake
deal.II/source/base/CMakeLists.txt
deal.II/source/distributed/CMakeLists.txt
deal.II/source/dofs/CMakeLists.txt
deal.II/source/fe/CMakeLists.txt
deal.II/source/grid/CMakeLists.txt
deal.II/source/hp/CMakeLists.txt
deal.II/source/lac/CMakeLists.txt
deal.II/source/multigrid/CMakeLists.txt
deal.II/source/numerics/CMakeLists.txt

index 97d63bb986848817cf48ce1864b9f3dd7db050d3..e91e4804a8d338fe46d442add4a1160b87e3bddf 100644 (file)
@@ -72,8 +72,8 @@ MACRO(SETUP_THREADING var)
     STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
 
     IF(NOT DEAL_II_HAVE_SANE_MT_DEFINITIONS)
-      LIST(APPEND DEAL_II_DEFINITIONS "-D_REENTRANT" "-D_THREAD_SAFE")
-      LIST(APPEND DEAL_II_USER_DEFINITIONS "-D_REENTRANT" "-D_THREAD_SAFE") # TODO: Necessary?
+      LIST(APPEND DEAL_II_DEFINITIONS "_REENTRANT" "_THREAD_SAFE")
+      LIST(APPEND DEAL_II_USER_DEFINITIONS "_REENTRANT" "_THREAD_SAFE") # TODO: Necessary?
     ENDIF()
 
   ENDIF(Threads_FOUND)
@@ -102,8 +102,7 @@ MACRO(FEATURE_TBB_CONFIGURE_EXTERNAL var)
     IF(TBB_DEBUG_FOUND)
       LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${TBB_DEBUG_LIBRARY})
       LIST(APPEND DEAL_II_DEFINITIONS_DEBUG
-        "-DTBB_USE_DEBUG=1"
-        "-DTBB_DO_ASSERT=1"
+        "TBB_USE_DEBUG=1" "TBB_DO_ASSERT=1"
         )
     ELSE()
       MESSAGE(STATUS
@@ -148,7 +147,7 @@ MACRO(FEATURE_TBB_CONFIGURE_CONTRIB var)
   #
   IF (CMAKE_BUILD_TYPE MATCHES "Debug")
     LIST(APPEND DEAL_II_DEFINITIONS_DEBUG
-      "-DTBB_DO_DEBUG=1" "-DTBB_DO_ASSERT=1"
+      "TBB_DO_DEBUG=1" "TBB_DO_ASSERT=1"
       )
   ENDIF()
 
index f1ef23ce9c449fe1251ca62f937e4acfbb1e3b16..c395bcd0b12ad01400ace764083bc5793f468237 100644 (file)
@@ -61,10 +61,10 @@ MACRO(FEATURE_BOOST_CONFIGURE_CONTRIB var)
   # library:
   #
   LIST(APPEND DEAL_II_DEFINITIONS
-    "-DBOOST_NO_HASH" "-DBOOST_NO_SLIST"
+    "BOOST_NO_HASH" "BOOST_NO_SLIST"
     )
   LIST(APPEND DEAL_II_USER_DEFINIITONS
-    "-DBOOST_NO_HASH" "-DBOOST_NO_SLIST"
+    "BOOST_NO_HASH" "BOOST_NO_SLIST"
     )
 
   INCLUDE_DIRECTORIES(
index 4c3770cb777dde9c86775ec0d0d2e8cd2a27fbc7..bbce6f645def2c27c18897e183e7c26b834fb705 100644 (file)
@@ -129,8 +129,8 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       STRIP_FLAG(CMAKE_REQUIRED_FLAGS "-DHAS_C99_TR1_CMATH")
 
       IF(TRILINOS_HAS_C99_TR1_WORKAROUND)
-        LIST(APPEND DEAL_II_DEFINITIONS "-DHAS_C99_TR1_CMATH")
-        LIST(APPEND DEAL_II_USER_DEFINITIONS "-DHAS_C99_TR1_CMATH")
+        LIST(APPEND DEAL_II_DEFINITIONS "HAS_C99_TR1_CMATH")
+        LIST(APPEND DEAL_II_USER_DEFINITIONS "HAS_C99_TR1_CMATH")
       ELSE()
         MESSAGE(WARNING "\n"
           "Your Trilinos installation is not compatible with the C++ standard selected for\n"
diff --git a/deal.II/cmake/macros/macro_deal_ii_add_dependencies.cmake b/deal.II/cmake/macros/macro_deal_ii_add_dependencies.cmake
new file mode 100644 (file)
index 0000000..d527cb5
--- /dev/null
@@ -0,0 +1,16 @@
+
+#
+# TODO: A comment
+#
+
+MACRO(DEAL_II_ADD_DEPENDENCIES name target)
+
+  IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+    ADD_DEPENDENCIES(${name}.g ${target}.g)
+  ENDIF()
+
+  IF(CMAKE_BUILD_TYPE MATCHES "Release")
+    ADD_DEPENDENCIES(${name} ${target})
+  ENDIF()
+
+ENDMACRO()
diff --git a/deal.II/cmake/macros/macro_deal_ii_add_library.cmake b/deal.II/cmake/macros/macro_deal_ii_add_library.cmake
new file mode 100644 (file)
index 0000000..3f8cdbc
--- /dev/null
@@ -0,0 +1,38 @@
+
+#
+# TODO: A comment
+#
+
+MACRO(DEAL_II_ADD_LIBRARY name)
+
+  IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+    #
+    # and a debug target
+    #
+    ADD_LIBRARY(${name}.g
+      ${ARGN}
+      )
+
+    SET_TARGET_PROPERTIES(${name}.g PROPERTIES
+      LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}"
+      COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_DEBUG}"
+      COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_DEBUG}"
+      )
+  ENDIF()
+
+  IF(CMAKE_BUILD_TYPE MATCHES "Release")
+    #
+    # Add a release target
+    #
+    ADD_LIBRARY(${name}
+      ${ARGN}
+      )
+
+    SET_TARGET_PROPERTIES(${name} PROPERTIES
+      LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}"
+      COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_RELEASE}"
+      COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_RELEASE}"
+      )
+  ENDIF()
+
+ENDMACRO()
index cb2f60e11ed3e35542f24f5639b0ae75572356c9..3b1bcd91e0449f457cf855b8d7d016ed80b61df7 100644 (file)
@@ -2,7 +2,7 @@
 # A macro for the inst.in file expansion
 #
 # Usage:
-#     macro_expand_instantiations(target inst_in_files)
+#     EXPAND_INSTANTATIONS(target inst_in_files)
 #
 # Options:
 #
@@ -16,7 +16,7 @@
 #    a list of inst.in files that will be expanded
 #
 
-MACRO(macro_expand_instantiations target inst_in_files)
+MACRO(EXPAND_INSTANTIATIONS target inst_in_files)
   FOREACH (inst_in_file ${inst_in_files})
     STRING(REGEX REPLACE "\\.in$" "" inst_file "${inst_in_file}" )
 
@@ -43,6 +43,12 @@ MACRO(macro_expand_instantiations target inst_in_files)
   # Add a dependency to target so that target.inst is fully generated
   # before target will be processed.
   #
-  ADD_DEPENDENCIES(${target} ${target}.inst)
+  IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+    ADD_DEPENDENCIES(${target}.g ${target}.inst)
+  ENDIF()
+  IF(CMAKE_BUILD_TYPE MATCHES "Release")
+    ADD_DEPENDENCIES(${target} ${target}.inst)
+  ENDIF()
+
 ENDMACRO()
 
index abd20a23b7c5ee39ea90d62f5e0ece34bd438449..42c01b62f35dd9ab5fb28002994e44b51e3d95e5 100644 (file)
@@ -127,8 +127,8 @@ ENDIF()
 
 IF (CMAKE_BUILD_TYPE MATCHES "Debug")
 
-  LIST(APPEND DEAL_II_DEFINITIONS_DEBUG "-DDEBUG")
-  LIST(APPEND DEAL_II_USER_DEFINTIONS_DEBUG "-DDEBUG")
+  LIST(APPEND DEAL_II_DEFINITIONS_DEBUG "DEBUG")
+  LIST(APPEND DEAL_II_USER_DEFINTIONS_DEBUG "DEBUG")
 
   ADD_FLAGS(DEAL_II_CXX_FLAGS_DEBUG "-O0")
 
index 13ad99d0c4bac5638343e7872d19ce6286cc6b8c..17bc7399e43a5886a135521b7850cdb34bbb5d5b 100644 (file)
@@ -46,6 +46,6 @@ SET(src_base
   utilities.cc
   )
 
-ADD_LIBRARY(obj_base OBJECT ${src_base})
-ADD_DEPENDENCIES(obj_base deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_base OBJECT ${src_base})
+DEAL_II_ADD_DEPENDENCIES(obj_base deal_ii_target_dependencies)
 
index 44b609ba56d0233a104cc373795044496b8ad3fb..e5c21cbec88f86496b343eaaa472f6ebbfd3f55c 100644 (file)
@@ -10,6 +10,6 @@ SET(inst_in_files
   tria.inst.in
   )
 
-ADD_LIBRARY(obj_distributed OBJECT ${src})
-macro_expand_instantiations(obj_distributed "${inst_in_files}")
-ADD_DEPENDENCIES(obj_distributed deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_distributed OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_distributed "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_distributed deal_ii_target_dependencies)
index cbf571ae7fce47b3d2583dec5114f378eb5dc899..cc8db53bf88ffb19f892611d582a1dfcb11d733f 100644 (file)
@@ -20,6 +20,6 @@ SET(inst_in_files
   dof_tools.inst.in
   )
 
-ADD_LIBRARY(obj_dofs OBJECT ${src})
-macro_expand_instantiations(obj_dofs "${inst_in_files}")
-ADD_DEPENDENCIES(obj_dofs deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_dofs OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_dofs "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_dofs deal_ii_target_dependencies)
index a9593060bd3e86928fcc3850bf0a1a16aa104ee5..6546ec8722727e5fb0c4008413f19a10865326bf 100644 (file)
@@ -63,6 +63,6 @@ SET(inst_in_files
   mapping_q.inst.in
   )
 
-ADD_LIBRARY(obj_fe OBJECT ${src})
-macro_expand_instantiations(obj_fe "${inst_in_files}")
-ADD_DEPENDENCIES(obj_fe deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_fe OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_fe "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_fe deal_ii_target_dependencies)
index 92a498766a8f17ffe54c3fc048ad32e43b212d37..bd5e2c8f67ad6318afa691c939f0c830270f0427 100644 (file)
@@ -30,6 +30,6 @@ SET(inst_in_files
   tria_objects.inst.in
   )
 
-ADD_LIBRARY(obj_grid OBJECT ${src})
-macro_expand_instantiations(obj_grid "${inst_in_files}")
-ADD_DEPENDENCIES(obj_grid deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_grid OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_grid "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_grid deal_ii_target_dependencies)
index 5aad2535144b754de8783d4f9e7f343ea8cc4872..6bdbe6841608f6280312de05fee73a5374e0dc62 100644 (file)
@@ -15,6 +15,6 @@ SET(inst_in_files
   mapping_collection.inst.in
   )
 
-ADD_LIBRARY(obj_hp OBJECT ${src})
-macro_expand_instantiations(obj_hp "${inst_in_files}")
-ADD_DEPENDENCIES(obj_hp deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_hp OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_hp "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_hp deal_ii_target_dependencies)
index 56d059dbdfcddb02e96b6656a65fb8e13c8548da..fbaa195dae19d67d996c3aa50d4eb817f1668c41 100644 (file)
@@ -78,6 +78,6 @@ SET(inst_in_files
   vector_view.inst.in
 )
 
-ADD_LIBRARY(obj_lac OBJECT ${src})
-macro_expand_instantiations(obj_lac "${inst_in_files}")
-ADD_DEPENDENCIES(obj_lac deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_lac OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_lac "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_lac deal_ii_target_dependencies)
index 734a5ed9f4462eda1f28c97f4e38490af213e616..f350671bfa383d722a14774d7ee2258c157e45ac 100644 (file)
@@ -18,6 +18,6 @@ SET(inst_in_files
   mg_transfer_prebuilt.inst.in
   )
 
-ADD_LIBRARY(obj_multigrid OBJECT ${src})
-macro_expand_instantiations(obj_multigrid "${inst_in_files}")
-ADD_DEPENDENCIES(obj_multigrid deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_multigrid OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_multigrid "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_multigrid deal_ii_target_dependencies)
index 1abb241609b89fced143851b9bafb5a3ff1a7f13..f98d5cfd8a8892c48ec442dc40f65b94f6b4a721 100644 (file)
@@ -40,6 +40,6 @@ SET(inst_in_files
   vector_tools.inst.in
   )
 
-ADD_LIBRARY(obj_numerics OBJECT ${src})
-macro_expand_instantiations(obj_numerics "${inst_in_files}")
-ADD_DEPENDENCIES(obj_numerics deal_ii_target_dependencies)
+DEAL_II_ADD_LIBRARY(obj_numerics OBJECT ${src})
+EXPAND_INSTANTIATIONS(obj_numerics "${inst_in_files}")
+DEAL_II_ADD_DEPENDENCIES(obj_numerics deal_ii_target_dependencies)

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.