|
|
|
@ -54,6 +54,7 @@ configure_file(
|
|
|
|
|
option(DisableMEX "DisableMEX" ON)
|
|
|
|
|
option(StaticMKL "StaticMKL" OFF)
|
|
|
|
|
option(DisableBladeRF "DisableBladeRF" OFF)
|
|
|
|
|
set(GCC_ARCH native CACHE STRING "GCC compile for specific architecture.")
|
|
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
|
# Install Dirs
|
|
|
|
@ -101,24 +102,24 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-write-strings -Wno-format-extra-args -Winline -Wno-unused-result -Wno-format -std=c99 -D_GNU_SOURCE -g")
|
|
|
|
|
|
|
|
|
|
find_package(SSE)
|
|
|
|
|
|
|
|
|
|
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
find_package(SSE)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
|
|
|
|
|
if(HAVE_AVX)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
elseif(HAVE_SSE)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
|
|
|
|
|
endif(HAVE_AVX)
|
|
|
|
|
else(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
|
|
|
|
find_package(SSE)
|
|
|
|
|
if (HAVE_AVX2)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx2 -Ofast -funroll-loops -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -mavx2 -Ofast -funroll-loops -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
else (HAVE_AVX2)
|
|
|
|
|
if(HAVE_AVX)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx -Ofast -funroll-loops -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -mavx -Ofast -funroll-loops -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
elseif(HAVE_SSE)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -msse4.1 -Ofast -funroll-loops -DLV_HAVE_SSE")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -msse4.1 -Ofast -funroll-loops -DLV_HAVE_SSE")
|
|
|
|
|
endif(HAVE_AVX)
|
|
|
|
|
endif (HAVE_AVX2)
|
|
|
|
|
|
|
|
|
|