|
|
|
@ -83,19 +83,23 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
|
#Any additional flags for CXX
|
|
|
|
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
|
|
|
|
|
|
FIND_PACKAGE(SSE)
|
|
|
|
|
|
|
|
|
|
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 -march=native -O3")
|
|
|
|
|
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")
|
|
|
|
|
|
|
|
|
|
IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
|
|
|
|
|
ELSE(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
FIND_PACKAGE(SSE)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
|
|
|
|
IF(HAVE_AVX)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
|
|
|
|
|
ELSEIF(HAVE_SSE)
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
|
|
|
|
|
ENDIF(HAVE_AVX)
|
|
|
|
|
ENDIF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wno-error=implicit-function-declaration -Wno-error=unused-but-set-variable")
|
|
|
|
|
# ENDIF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
|
|
|
|
IF(NOT WIN32)
|
|
|
|
|
ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
|
|
|
|
|
ENDIF(NOT WIN32)
|
|
|
|
|