]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disable some warnings when compiling umfpack.
authorMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 19 Sep 2012 12:23:12 +0000 (12:23 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 19 Sep 2012 12:23:12 +0000 (12:23 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26502 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/contrib/cmake/setup_cached_variables.cmake [moved from deal.II/contrib/cmake/setup_cached_compiler_flags.cmake with 95% similarity]
deal.II/contrib/cmake/setup_compiler_flags.cmake
deal.II/contrib/cmake/setup_compiler_flags_gnu.cmake
deal.II/source/CMakeLists.txt

index a88010bb71e6593a1363bdf82705b41feb1de43b..9b099086eb1eaa5293cfbf257ca40bf2e93fa989 100644 (file)
@@ -90,6 +90,7 @@ SET(VERSION "8.0.pre")
 #
 #  $ cmake -DCMAKE_CXX_FLAGS="-Wno-sign-compare" <...>
 #
+#
 
 
 
@@ -191,12 +192,6 @@ OPTION(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS
   compiler flag setup."
   ON)
 
-OPTION(DEAL_II_BUILD_SHARED_LIBRARY
-  "Build deal.II as a shared library."
-  ON) # TODO: Implement an archive target ...
-
-
-
 
 ###########################################################################
 #                                                                         #
@@ -232,11 +227,10 @@ INCLUDE(setup_external_macros)
 
 
 #
-# We have to initialize some cached variable before PROJECT is called, so
-# configure the cached, user editable CMAKE_BUILD_TYPES, CMAKE_CXX_FLAGS,
-# etc. variables at this point:
+# We have to initialize some cached variables before PROJECT is called, so
+# go it at this point:
 #
-INCLUDE(setup_cached_compiler_flags)
+INCLUDE(setup_cached_variables)
 
 #
 # Now, set the project and setup the rest:
similarity index 95%
rename from deal.II/contrib/cmake/setup_cached_compiler_flags.cmake
rename to deal.II/contrib/cmake/setup_cached_variables.cmake
index 700653081bd4bcfdc744bae141a845ccfea5255f..ea673de7f16083621fb65a2fc9cc151859afebaf 100644 (file)
@@ -50,6 +50,10 @@ IF( NOT CMAKE_BUILD_TYPE MATCHES "Release" AND
   MESSAGE(FATAL_ERROR "CMAKE_BUILD_TYPE does neither match Release, nor Debug.")
 ENDIF()
 
+#
+# Set BUILD_SHARED_LIBS to default to ON:
+#
+SET(BUILD_SHARED_LIBS TRUE CACHE BOOL "Build a shared library")
 
 #
 # Set cached compiler flags to an empty string:
index 92dc581cd60043ea2350cfee25ff0fee1cc86a4b..25590ee0878b7bc41d39665d8609f54e54a4a8ed 100644 (file)
@@ -34,7 +34,6 @@
 #
 
 
-#
 #
 #   ######################
 #   #     FAT NOTE 2:    #
@@ -53,10 +52,9 @@ IF(NOT ( ${CMAKE_C_COMPILER_ID} STREQUAL ${CMAKE_CXX_COMPILER_ID} AND
       "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}\n"
       )
 ENDIF()
+
 #
-# ... and that we can set the same _default_ flags for both,
-# so we can just set all C-Flags to the corrersponding CXX-Flags at the end
-# of this script.
+# Setup CMAKE_CXX_FLAGS<_RELEASE|_DEBUG>:
 #
 
 IF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
@@ -85,10 +83,23 @@ ELSE(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
     )
 ENDIF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
 
+
+#
+# Setup CMAKE_C_FLAGS<_RELEASE|_DEBUG>:
+#
+
 #
 # For the moment we assume that CC and CXX are the same compiler and that
-# we can set the same _default_ flags for both.
+# we can set (almost) the same default flags for both.
 #
+
 SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
 SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
 SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
+
+#
+# Strip some CXX-only flags
+#
+
+STRIP_FLAG(CMAKE_C_FLAGS "-Wsynth")
+STRIP_FLAG(CMAKE_C_FLAGS_RELEASE "-felide-constructors")
index 81572b975adda0a83b5306744f8968b6fe6b7318..f643c85bcd8c3dcdb0f23596a4166fb221ca1774 100644 (file)
@@ -114,6 +114,8 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS_RELEASE "-funroll-loops")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS_RELEASE "-fstrict-aliasing")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS_RELEASE "-felide-constructors")
 
+ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS_RELEASE "-Wno-unused")
+
 
 
 ###############################
index cdabc1dc4f27e0590f8590b46dac4f97a0d46a50..a9378efece50f679da2d74c4c7172be6b1482f80 100644 (file)
@@ -23,25 +23,20 @@ ADD_SUBDIRECTORY(multigrid)
 ADD_SUBDIRECTORY(numerics)
 
 
-#
-# Combine all OBJECT targets to a shared library:
-#
-
-ADD_LIBRARY(deal_II SHARED
- $<TARGET_OBJECTS:obj_base>
- $<TARGET_OBJECTS:obj_distributed>
- $<TARGET_OBJECTS:obj_dofs>
- $<TARGET_OBJECTS:obj_fe>
- $<TARGET_OBJECTS:obj_grid>
- $<TARGET_OBJECTS:obj_hp>
- $<TARGET_OBJECTS:obj_lac>
- $<TARGET_OBJECTS:obj_multigrid>
- $<TARGET_OBJECTS:obj_numerics>
-
- # for contrib stuff:
- ${deal_ii_additional_object_files}
- )
-
+ADD_LIBRARY(deal_II #whether SHARED or STATIC is set by BUILD_SHARED_LIBS#
+  $<TARGET_OBJECTS:obj_base>
+  $<TARGET_OBJECTS:obj_distributed>
+  $<TARGET_OBJECTS:obj_dofs>
+  $<TARGET_OBJECTS:obj_fe>
+  $<TARGET_OBJECTS:obj_grid>
+  $<TARGET_OBJECTS:obj_hp>
+  $<TARGET_OBJECTS:obj_lac>
+  $<TARGET_OBJECTS:obj_multigrid>
+  $<TARGET_OBJECTS:obj_numerics>
+
+  # for contrib stuff:
+  ${deal_ii_additional_object_files}
+  )
 
 #
 # Sonaming: Well... we just use the version number.
@@ -54,10 +49,8 @@ SET_TARGET_PROPERTIES(deal_II PROPERTIES
   DEBUG_POSTFIX ".g"
   )
 
-
 SET_TARGET_PROPERTIES(deal_II PROPERTIES
   LINK_FLAGS "${deal_ii_required_linker_flags}"
   )
 
-
 TARGET_LINK_LIBRARIES(deal_II ${deal_ii_external_libraries})

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.