Commit ee6402d6 authored by COULAUD Olivier's avatar COULAUD Olivier

Fix GCC AVX SSE problem on mac (core-i7)

parent bd29df69
......@@ -69,8 +69,13 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/CMakeModules/morse/")
option( SCALFMM_USE_MEM_STATS "Set to ON to profile memory" OFF )
option( SCALFMM_ATTACHE_SOURCE "Set to ON to compile with -g" OFF )
option( SCALFMM_USE_ADDONS "Set to ON to compile add ons" OFF )
CMAKE_DEPENDENT_OPTION( SCALFMM_USE_SSE "Set to ON to compile with SSE support (and use intrinsec SSE P2P)" ON "CPUOPTION_SSE3;NOT CPUOPTION_AVX;NOT CPUOPTION_AVX2" OFF )
CMAKE_DEPENDENT_OPTION( SCALFMM_USE_AVX "Set to ON to compile with AVX support (and use intrinsec AVX P2P)" ON "CPUOPTION_AVX; NOT CPUOPTION_AVX2" OFF )
if( APPLE ) # to fix problem with GCC and avx
CMAKE_DEPENDENT_OPTION( SCALFMM_USE_SSE "Set to ON to compile with SSE support (and use intrinsec SSE P2P)" ON "CPUOPTION_SSE3;NOT CPUOPTION_AVX2" OFF )
CMAKE_DEPENDENT_OPTION( SCALFMM_USE_AVX "Set to ON to compile with AVX support (and use intrinsec AVX P2P)" OFF "CPUOPTION_AVX; NOT CPUOPTION_AVX2" OFF )
else(APPLE)
CMAKE_DEPENDENT_OPTION( SCALFMM_USE_SSE "Set to ON to compile with SSE support (and use intrinsec SSE P2P)" ON "CPUOPTION_SSE3;NOT CPUOPTION_AVX;NOT CPUOPTION_AVX2" OFF )
CMAKE_DEPENDENT_OPTION( SCALFMM_USE_AVX "Set to ON to compile with AVX support (and use intrinsec AVX P2P)" ON "CPUOPTION_AVX; NOT CPUOPTION_AVX2" OFF )
endif(APPLE)
CMAKE_DEPENDENT_OPTION( SCALFMM_USE_AVX2 "Set to ON to compile with AVX support (and use intrinsec AVXZ P2P)" ON "CPUOPTION_AVX2" OFF )
option( SCALFMM_USE_ASSERT "Set to ON to enable safe tests during execution" ON )
option( SCALFMM_USE_MIC_NATIVE "Set to ON to compile in native mode for MIC" OFF )
......@@ -144,12 +149,15 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/CMakeModules/morse/")
set(SCALFMM_CXX_FLAGS "${SCALFMM_CXX_FLAGS} -Wno-literal-suffix")
endif()
endif()
set(AVX_FLAGS "-mtune=native -march=native")
set(AVX2_FLAGS "-mtune=native -march=native -mmic")
IF (APPLE)
set(SSE_FLAGS "-msse3 -mfpmath=sse") # -mtune=native -march=native
set(SSE_FLAGS "-msse4 -mfpmath=sse") # -mtune=native -march=native
set(SSE_FLAGS "-msse3 -mfpmath=sse")
set(AVX_FLAGS "-mtune=native -march=avx")
set(AVX2_FLAGS "-mtune=native -march=native -mmic")
else(APPLE)
set(SSE_FLAGS "-mtune=native -march=native") # -mtune=native -march=native
set(SSE_FLAGS "-mtune=native -march=native")
set(AVX_FLAGS "-mtune=native -march=native")
set(AVX2_FLAGS "-mtune=native -march=native -mmic")
endif(APPLE)
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