From 8c496bceea3aa33f3f580acff1dbd5204ec37e49 Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 30 Apr 2013 07:34:23 +0000 Subject: [PATCH] CMake: Small cleanup in check_*, take over r29403 to trunk git-svn-id: https://svn.dealii.org/trunk@29404 0785d39b-7218-0410-832d-ea1e28bc413d --- .../checks/check_01_compiler_features.cmake | 22 +++++++++---------- ...s.cmake => check_02_system_features.cmake} | 10 +++++++++ ...ugs.cmake => check_03_compiler_bugs.cmake} | 0 3 files changed, 21 insertions(+), 11 deletions(-) rename deal.II/cmake/checks/{check_01_system_features.cmake => check_02_system_features.cmake} (93%) rename deal.II/cmake/checks/{check_02_compiler_bugs.cmake => check_03_compiler_bugs.cmake} (100%) diff --git a/deal.II/cmake/checks/check_01_compiler_features.cmake b/deal.II/cmake/checks/check_01_compiler_features.cmake index 8b4ec89a2e..17063b529e 100644 --- a/deal.II/cmake/checks/check_01_compiler_features.cmake +++ b/deal.II/cmake/checks/check_01_compiler_features.cmake @@ -148,15 +148,7 @@ 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. So, only enable -rdynamic on non-Darwin -# platforms. -# -# - Matthias Maier, rewritten 2012 -# -IF(HAVE_GLIBC_STACKTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") +IF(HAVE_GLIBC_STACKTRACE) ENABLE_IF_SUPPORTED(CMAKE_SHARED_LINKER_FLAGS "-rdynamic") ENDIF() @@ -269,10 +261,18 @@ ENDIF() # per email by John Fowkes on the mailing list in Feb 2012, # so don't run the test on cygwin. # -# - Matthias Maier, rewritten 2012 +# Finally, Intel's icpc compiler complains about the flag +# but apparently only if the file to be compiled contains +# particular content. See bug #46 in the Google Code bug +# data base (http://code.google.com/p/dealii/issues/detail?id=46). +# It proved impossible to track down under which circumstances +# this happens, and so it was disabled for icpc. +# +# - Matthias Maier, rewritten 2012, 2013 # IF( (NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN") AND - (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") ) + (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") AND + (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel") ) ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-Wa,--compress-debug-sections") ENDIF() diff --git a/deal.II/cmake/checks/check_01_system_features.cmake b/deal.II/cmake/checks/check_02_system_features.cmake similarity index 93% rename from deal.II/cmake/checks/check_01_system_features.cmake rename to deal.II/cmake/checks/check_02_system_features.cmake index a85e40fecc..4288bff50b 100644 --- a/deal.II/cmake/checks/check_01_system_features.cmake +++ b/deal.II/cmake/checks/check_02_system_features.cmake @@ -82,9 +82,19 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Darwin") # this flag any more, so check whether we can indeed do this # ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-double") + + # + # 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. + # + # TODO: MM: Check whether this is still necessary... + # + STRIP_FLAG(CMAKE_SHARED_LINKER_FLAGS "-rdynamic") ENDIF() + ########################################################################### # # # Windows and CYGWIN specific setup: # diff --git a/deal.II/cmake/checks/check_02_compiler_bugs.cmake b/deal.II/cmake/checks/check_03_compiler_bugs.cmake similarity index 100% rename from deal.II/cmake/checks/check_02_compiler_bugs.cmake rename to deal.II/cmake/checks/check_03_compiler_bugs.cmake -- 2.39.5