From fe8ff161ec2bc314b42289960458a869760ce66e Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 2 Jan 2013 13:17:58 +0000 Subject: [PATCH] Some cleanup in the compiler flags setup git-svn-id: https://svn.dealii.org/branches/branch_cmake@27893 0785d39b-7218-0410-832d-ea1e28bc413d --- .../checks/check_for_compiler_bugs.cmake | 1 + .../checks/check_for_system_features.cmake | 17 +++++++++++++--- deal.II/cmake/config/CMakeLists.txt | 2 -- deal.II/cmake/setup_compiler_flags_gnu.cmake | 20 ++++++------------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/deal.II/cmake/checks/check_for_compiler_bugs.cmake b/deal.II/cmake/checks/check_for_compiler_bugs.cmake index 9214f680b9..568cefed59 100644 --- a/deal.II/cmake/checks/check_for_compiler_bugs.cmake +++ b/deal.II/cmake/checks/check_for_compiler_bugs.cmake @@ -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)): # diff --git a/deal.II/cmake/checks/check_for_system_features.cmake b/deal.II/cmake/checks/check_for_system_features.cmake index 92e3c1bf00..d7dce0e039 100644 --- a/deal.II/cmake/checks/check_for_system_features.cmake +++ b/deal.II/cmake/checks/check_for_system_features.cmake @@ -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() diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index ced316aa2e..579bdfbbcb 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -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 diff --git a/deal.II/cmake/setup_compiler_flags_gnu.cmake b/deal.II/cmake/setup_compiler_flags_gnu.cmake index 2a9f0285ad..52a9f542d2 100644 --- a/deal.II/cmake/setup_compiler_flags_gnu.cmake +++ b/deal.II/cmake/setup_compiler_flags_gnu.cmake @@ -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() -- 2.39.5