mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 08:21:58 +02:00
compiler fixes for GCC/clang
This commit is contained in:
parent
8faaa36913
commit
b60b9bb312
2 changed files with 13 additions and 3 deletions
|
@ -24,6 +24,16 @@ macro(SETUP_HIFI_LIBRARY)
|
||||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx)
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
# add compiler flags to AVX2 source files
|
||||||
|
file(GLOB_RECURSE AVX2_SRCS "src/avx2/*.cpp" "src/avx2/*.c")
|
||||||
|
foreach(SRC ${AVX2_SRCS})
|
||||||
|
if (WIN32)
|
||||||
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX2)
|
||||||
|
elseif (APPLE OR UNIX)
|
||||||
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
setup_memory_debugger()
|
setup_memory_debugger()
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// AudioSRC_avx.cpp
|
// AudioSRC_avx2.cpp
|
||||||
// libraries/audio/src
|
// libraries/audio/src
|
||||||
//
|
//
|
||||||
// Created by Ken Cooke on 6/5/16.
|
// Created by Ken Cooke on 6/5/16.
|
||||||
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
#include "../AudioSRC.h"
|
#include "../AudioSRC.h"
|
||||||
|
|
||||||
#ifndef __AVX__
|
#ifndef __AVX2__
|
||||||
#error Must be compiled with /arch:AVX or -mavx.
|
#error Must be compiled with /arch:AVX2 or -mavx2 -mfma.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// high/low part of int64_t
|
// high/low part of int64_t
|
Loading…
Reference in a new issue