]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Some cleanup in the compiler flags setup
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 2 Jan 2013 13:17:58 +0000 (13:17 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 2 Jan 2013 13:17:58 +0000 (13:17 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@27893 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/checks/check_for_compiler_bugs.cmake
deal.II/cmake/checks/check_for_system_features.cmake
deal.II/cmake/config/CMakeLists.txt
deal.II/cmake/setup_compiler_flags_gnu.cmake

index 9214f680b9e73234ac9d6b2f97adb796b1d3a526..568cefed59e60598612a0d653a537a3a94c75d1c 100644 (file)
@@ -202,6 +202,7 @@ CHECK_CXX_COMPILER_BUG(
   DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG
   )
 
+
 #
 # Many compilers get this wrong (see Section 14.7.3.1, number (4)):
 #
index 92e3c1bf0074e70a8375d7d06f845a9eaec872e1..d7dce0e03900a9725be87016f6d48417828e4a1e 100644 (file)
@@ -183,11 +183,22 @@ ENDIF()
 #                                                                         #
 ###########################################################################
 
-#
-# Export DEAL_II_MSVC if we are on a Windows platform.
-#
 IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
+  #
+  # Export DEAL_II_MSVC if we are on a Windows platform:
+  #
   SET(DEAL_II_MSVC TRUE)
+
+  #
+  # Disable -ggdb and -g on Windows/MinGW targets for the moment until the
+  # compilation issues with too big files is resolved
+  #
+  # - Matthias Maier, 2012
+  #
+  STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
+  STRIP_FLAG(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-ggdb")
+  STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-g")
+  STRIP_FLAG(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-g")
 ENDIF()
 
 
index ced316aa2e84b55f6f438f8d15151d7e6e45bad0..579bdfbbcbad97809415394f800318242dd3063b 100644 (file)
@@ -148,7 +148,6 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
       ${DEAL_II_USER_DEFINITIONS_${build}}
       )
 
-
     FOREACH(_lib
         ${MAKEFILE_LIBRARY_${build}}
         ${DEAL_II_EXTERNAL_LIBRARIES}
@@ -193,7 +192,6 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   COND_SET_TO_YES(DEAL_II_WITH_P4EST MAKEFILE_P4EST)
   COND_SET_TO_YES(DEAL_II_WITH_MPI MAKEFILE_MPI)
 
-
   CONFIGURE_FILE(
     ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
     ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
index 2a9f0285ad0ee9a9a89da066deec73529f3abc37..52a9f542d2d3495cbea53bfd5580e2f715f9f4e1 100644 (file)
@@ -133,22 +133,14 @@ IF (CMAKE_BUILD_TYPE MATCHES "Debug")
 
   ADD_FLAGS(DEAL_II_CXX_FLAGS_DEBUG "-O0")
 
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
+  ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-ggdb")
   #
-  # Disable -ggdb and -g on Windows/MinGW targets for the moment until the
-  # compilation issues with too big files is resolved
+  # If -ggdb is not available, fall back to -g:
   #
-  # - Matthias Maier, 2012
-  #
-  IF(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
-    ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
-    ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-ggdb")
-    #
-    # If -ggdb is not available, fall back to -g:
-    #
-    IF(NOT DEAL_II_HAVE_FLAG_ggdb)
-      ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-g")
-      ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-g")
-    ENDIF()
+  IF(NOT DEAL_II_HAVE_FLAG_ggdb)
+    ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-g")
+    ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-g")
   ENDIF()
 ENDIF()
 

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.