# 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
# 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(
"
# 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")
# 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 ...
"
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(
# 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()