Commit 3aba6018 authored by BRAMAS Berenger's avatar BRAMAS Berenger

move to O3 opti

parent 8fc0a545
......@@ -80,9 +80,9 @@ if( ScalFMM_BUILD_DEBUG )
ADD_DEFINITIONS(${SCALFMM_FLAGS_OPTI_DEBUG})
else()
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} )
# force -O3 in release
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
STRING(REPLACE "-O2" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} )
# if compiler is intel add -ip
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
ADD_DEFINITIONS(-ip)
......@@ -94,9 +94,9 @@ else()
ELSE()
# Test if not apple and 64bits
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(SCALFMM_FLAGS_OPTI_RELEASE "-m64 -ffast-math -flto -march=native -funroll-loops" CACHE STRING "Set your optimization flags for release mode.")
SET(SCALFMM_FLAGS_OPTI_RELEASE "-m64 -ffast-math -flto -march=native -funroll-loops -ftree-vectorize" CACHE STRING "Set your optimization flags for release mode.")
else()
SET(SCALFMM_FLAGS_OPTI_RELEASE "-ffast-math -flto -march=native -funroll-loops" CACHE STRING "Set your optimization flags for release mode.")
SET(SCALFMM_FLAGS_OPTI_RELEASE "-ffast-math -flto -march=native -funroll-loops -ftree-vectorize" CACHE STRING "Set your optimization flags for release mode.")
endif()
ENDIF()
ADD_DEFINITIONS(${SCALFMM_FLAGS_OPTI_RELEASE})
......
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