From: Matthias Maier Date: Thu, 15 Aug 2013 02:31:47 +0000 (+0000) Subject: CMake: Reenable -O2 for intel-12* compilers. Set -no-ansi-alias unconditionally X-Git-Tag: v8.1.0~1060 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=998fb7a2c0f91fd6a47153f14348f1aef421d00a;p=dealii.git CMake: Reenable -O2 for intel-12* compilers. Set -no-ansi-alias unconditionally git-svn-id: https://svn.dealii.org/trunk@30314 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/setup_compiler_flags_intel.cmake b/deal.II/cmake/setup_compiler_flags_intel.cmake index e08b7a382a..ed67d96ad3 100644 --- a/deal.II/cmake/setup_compiler_flags_intel.cmake +++ b/deal.II/cmake/setup_compiler_flags_intel.cmake @@ -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()