From 0345429c8066af306157c232019ce96e6c003660 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 19 Sep 2012 15:05:08 +0000 Subject: [PATCH] Update git-svn-id: https://svn.dealii.org/branches/branch_cmake@26511 0785d39b-7218-0410-832d-ea1e28bc413d --- .../contrib/cmake/check/check_for_compiler_bugs.cmake | 8 ++++++++ .../cmake/check/check_for_compiler_features.cmake | 10 ++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake b/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake index ee3511f7e5..68bfbc4b90 100644 --- a/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake +++ b/deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake @@ -57,6 +57,8 @@ ENDIF() # that the workaround fails with some other compilers, so that # we can not unconditionally use the workaround... # +# - maier, rewritten 2012 +# CHECK_CXX_COMPILER_BUG( " namespace dealii @@ -91,6 +93,8 @@ CHECK_CXX_COMPILER_BUG( # in some of our template trickery with iterator classes. If necessary, # do not use the relevant warning flag # +# - maier, rewritten 2012 +# LIST(APPEND CMAKE_REQUIRED_FLAGS "-Wreturn-type -Werror") CHECK_CXX_COMPILER_BUG( " @@ -116,6 +120,8 @@ ENDIF() # This can be avoided by not using -pedantic for this compiler. # For all other versions, we use this flag, however. # +# - maier, rewritten 2012 +# IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION MATCHES "4.4.") STRIP_FLAG(CMAKE_CXX_FLAGS "-pedantic") @@ -131,6 +137,8 @@ ENDIF() # warning messages. Since this is annoying, switch of the flag -W which # causes this. # +# - maier, rewritten 2012 +# # TODO: We use the mpi.h header file for this check. We should test this # bug with another header file than mpi.h ... diff --git a/deal.II/contrib/cmake/check/check_for_compiler_features.cmake b/deal.II/contrib/cmake/check/check_for_compiler_features.cmake index ed1ad8b886..e7f3c49529 100644 --- a/deal.II/contrib/cmake/check/check_for_compiler_features.cmake +++ b/deal.II/contrib/cmake/check/check_for_compiler_features.cmake @@ -85,12 +85,13 @@ CHECK_CXX_SOURCE_COMPILES( " HAVE_GLIBC_STACKTRACE) +# # On Mac OS X, -rdynamic is accepted by the compiler (i.e. # it doesn't produce an error) but we always get a warning # that it isn't supported. That's pretty stupid because # we can't test for it. Consequently, only run the test # if not on OS X. - +# IF(HAVE_GLIBC_STACKTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") CHECK_CXX_COMPILER_FLAG( @@ -395,10 +396,11 @@ ENDIF() # unpacked again when they are put into the shared libs, so # no savings there. # -# TODO: # The flag also doesn't appear to be working on Cygwin, as # per email by John Fowkes on the mailing list in Feb 2012, # so don't run the test on cygwin. # -ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS_DEBUG "-Wa,--compress-debug-sections") -ENABLE_IF_SUPPORTED(CMAKE_C_FLAGS_DEBUG "-Wa,--compress-debug-sections") +IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN") + ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS_DEBUG "-Wa,--compress-debug-sections") + ENABLE_IF_SUPPORTED(CMAKE_C_FLAGS_DEBUG "-Wa,--compress-debug-sections") +ENDIF() -- 2.39.5