Enable MMX/SSE in files using intrinsics
In file included from src/mmx_optimized.cpp:65: /usr/include/clang/3.4.1/mmintrin.h:28:2: error: "MMX instruction set not enabled" #error "MMX instruction set not enabled" ^ src/mmx_optimized.cpp:73:11: error: unknown type name '__m64' const __m64 *pVec1, *pVec2; ^ src/mmx_optimized.cpp:82:15: error: always_inline function '_mm_cvtsi32_si64' requires target feature 'mmx', but would be inlined into function 'calcCrossCorr' that is compiled without support for 'mmx' shifter = _m_from_int(overlapDividerBitsNorm); ^ /usr/lib/clang/6.0.0/include/mmintrin.h:1512:21: note: expanded from macro '_m_from_int' #define _m_from_int _mm_cvtsi32_si64 ^
This commit is contained in:
parent
019d2089bb
commit
1d0e6cf47b
@ -1,3 +1,5 @@
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
set(SRCS
|
||||
src/AAFilter.cpp
|
||||
src/BPMDetect.cpp
|
||||
@ -14,5 +16,18 @@ set(SRCS
|
||||
src/sse_optimized.cpp
|
||||
src/TDStretch.cpp)
|
||||
|
||||
if(NOT MSVC)
|
||||
check_cxx_compiler_flag(-mmmx SOUNDTOUCH_HAS_MMMX)
|
||||
check_cxx_compiler_flag(-msse SOUNDTOUCH_HAS_MSSE)
|
||||
if(SOUNDTOUCH_HAS_MMMX)
|
||||
set_source_files_properties(src/mmx_optimized.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-mmmx")
|
||||
endif()
|
||||
if(SOUNDTOUCH_HAS_MSSE)
|
||||
set_source_files_properties(src/sse_optimized.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-msse")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(SoundTouch STATIC ${SRCS})
|
||||
target_include_directories(SoundTouch PUBLIC include PRIVATE src)
|
||||
|
Loading…
x
Reference in New Issue
Block a user