Commit 8610c3ac authored by Vitaly Kirsanov's avatar Vitaly Kirsanov Committed by Erik de Castro Lopo

Added /arch:SSE2 flag

parent aa96297d
......@@ -81,8 +81,8 @@ add_compile_options(
$<$<AND:$<BOOL:${HAVE_SSP_FLAG}>,$<BOOL:${ENABLE_SSP}>>:-fstack-protector>
$<$<AND:$<BOOL:${HAVE_SSP_FLAG}>,$<BOOL:${ENABLE_SSP}>>:--param>
$<$<AND:$<BOOL:${HAVE_SSP_FLAG}>,$<BOOL:${ENABLE_SSP}>>:ssp-buffer-size=4>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:HAVE_WEFFCXX_FLAG>>:-Weffc++>
$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:HAVE_DECL_AFTER_STMT_FLAG>>:-Wdeclaration-after-statement>)
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:${HAVE_WEFFCXX_FLAG}>>:-Weffc++>
$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:${HAVE_DECL_AFTER_STMT_FLAG}>>:-Wdeclaration-after-statement>)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND HAVE_STACKREALIGN_FLAG)
add_compile_options(-mstackrealign)
......
......@@ -2,12 +2,6 @@ cmake_minimum_required(VERSION 3.12)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86(_64)?|(AMD|amd)64|i[346]86")
option(WITH_AVX "Enable AVX, AVX2 optimizations" ON)
option(WITH_SSE "Enable AVX, AVX2 optimizations" ON)
endif()
check_c_compiler_flag(-msse2 HAVE_MSSE2_FLAG)
if(HAVE_MSSE2_FLAG AND WITH_SSE)
add_compile_options(-msse2)
endif()
option(WITH_ASM "Use any assembly optimization routines" ON)
......@@ -50,10 +44,21 @@ if(NOT WITH_ASM)
add_compile_definitions(FLAC__NO_ASM)
endif()
if(WITH_ASM AND IA32 AND CMAKE_ASM_NASM_COMPILER)
add_subdirectory(ia32)
if(IA32)
if(WITH_ASM AND CMAKE_ASM_NASM_COMPILER)
add_subdirectory(ia32)
endif()
option(WITH_SSE "Enable SSE2 optimizations" ON)
check_c_compiler_flag(-msse2 HAVE_MSSE2_FLAG)
if(WITH_SSE)
add_compile_options(
$<$<BOOL:${HAVE_MSSE2_FLAG}>:-msse2>
$<$<BOOL:${MSVC}>:/arch:SSE2>)
endif()
endif()
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
......
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