Move SIMD flags to CMAKE_CXX_FLAGS_RELEASE and fix a typo in the process
This commit is contained in:
parent
9e1aaa8b56
commit
33feb9a416
@ -9,6 +9,8 @@ if(COMMAND cmake_policy)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message("CMAKE Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
include (CheckFunctionExists)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckLibraryExists)
|
||||
@ -337,8 +339,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
if(ENABLE_SIMD)
|
||||
if (X86 OR X86_64)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -O3 -msse2 -mfpmath=sse")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -msse2 -mfpmath=sse")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3 -msse2 -mfpmath=sse")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -msse2 -mfpmath=sse")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -384,10 +386,14 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /MP /O2")
|
||||
set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /MP")
|
||||
if(ENABLE_SIMD)
|
||||
if (X86)
|
||||
set(MSVC_FLAGS "${MSVC_FLAGS} /arch:SSE /arch:SSE2")
|
||||
SET(CMAKE_C_FLAGS_RELEASE "/O2 /arch:SSE /arch:SSE2")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "/O2 /arch:SSE /arch:SSE2")
|
||||
else()
|
||||
SET(CMAKE_C_FLAGS_RELEASE "/O2")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "/O2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user