Commit efa4b0d3 authored by BRAMAS Berenger's avatar BRAMAS Berenger

Force O2 in release compilation even for intel by removing O3

parent 654c95a1
...@@ -44,6 +44,10 @@ if( SCALFMM_BUILD_DEBUG ) ...@@ -44,6 +44,10 @@ if( SCALFMM_BUILD_DEBUG )
ADD_DEFINITIONS(-O0) ADD_DEFINITIONS(-O0)
else() else()
SET(CMAKE_BUILD_TYPE Release) SET(CMAKE_BUILD_TYPE Release)
# force -O2 in release
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
STRING(REPLACE "-O3" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} )
# if compiler is intel add -ip
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") IF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
ADD_DEFINITIONS(-ip) ADD_DEFINITIONS(-ip)
ENDIF() ENDIF()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment