]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Reenable -O2 for intel-12* compilers. Set -no-ansi-alias unconditionally
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Aug 2013 02:31:47 +0000 (02:31 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Aug 2013 02:31:47 +0000 (02:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@30314 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_compiler_flags_intel.cmake

index e08b7a382a9398f0b944535cf867aaee9cfdb2df..ed67d96ad3c6c744f47e41360256f6e088522d2f 100644 (file)
@@ -104,11 +104,24 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release")
   #
   # General optimization flags:
   #
-  ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O1")
+
+  IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13.0" )
+    ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")
+  ELSE()
+    #
+    # Disable aggressive optimization for intel-13* compilers, until we
+    # resolve a lot of funny miscompilations...
+    #
+    # - Maier, 2013
+    #
+    ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O1")
+  ENDIF()
+
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-ip")
 
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-ansi-alias") # equiv. -fstrict-aliasing
+  # equivalent to -fno-strict-aliasing:
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-no-ansi-alias")
 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.