Skip to content

Commit

Permalink
Merge branch 'dev41' into unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
starg2 committed Dec 22, 2024
2 parents ea2d9af + 55e9601 commit f98b16b
Show file tree
Hide file tree
Showing 120 changed files with 470 additions and 53,654 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ cmake_policy(SET CMP0092 NEW) # Don't add /W3 flag in CMAKE_C_FLAGS by default
project(timidity41)

set(TIM41_X86_SIMD_LEVEL SSE42 CACHE STRING "x86 SIMD instruction set extension to use")
set_property(CACHE TIM41_X86_SIMD_LEVEL PROPERTY STRINGS SSE2 SSE42 AVX AVX2 AVX512)
set_property(CACHE TIM41_X86_SIMD_LEVEL PROPERTY STRINGS NONE SSE2 SSE42 AVX AVX2 AVX512)

set(TIM41_INTEL_ONLY FALSE CACHE BOOL "Optimize exclusively for Intel CPU; resulting binaries won't run on non-Intel CPUs")

set(TIM41_GCC_WITH_LIBICONV TRUE CACHE BOOL "GCC supports charset conversion")

set(TIM41_REGENERATE_NEWTON_TABLE FALSE CACHE BOOL "Regenerate newton_table.c")
set(TIM41_SPECTRE_MITIGATION FALSE CACHE BOOL "Enable Spectre mitigation")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out/bin" CACHE PATH "Where to put all the RUNTIME target files when built.")
Expand Down
45 changes: 26 additions & 19 deletions FLAC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,9 @@ add_library(
src/cpu.c
src/crc.c
src/fixed.c
src/fixed_intrin_avx2.c
src/fixed_intrin_sse2.c
src/fixed_intrin_sse42.c
src/fixed_intrin_ssse3.c
src/float.c
src/format.c
src/lpc.c
src/lpc_intrin_avx2.c
src/lpc_intrin_fma.c
src/lpc_intrin_sse2.c
src/lpc_intrin_sse41.c
src/md5.c
src/memory.c
src/metadata_iterators.c
Expand All @@ -98,25 +90,40 @@ add_library(
src/stream_decoder.c
src/stream_encoder.c
src/stream_encoder_framing.c
src/stream_encoder_intrin_avx2.c
src/stream_encoder_intrin_sse2.c
src/stream_encoder_intrin_ssse3.c
src/window.c

src/share/win_utf8_io/win_utf8_io.c

# src/version.rc
)

if(MSVC AND NOT TIM41_USE_AVX2)
set_source_files_properties(
src/fixed_intrin_avx2.c
src/lpc_intrin_avx2.c
src/lpc_intrin_fma.c
src/stream_encoder_intrin_avx2.c
PROPERTIES
COMPILE_OPTIONS /arch:AVX2
if(NOT ("${TIM41_X86_SIMD_LEVEL}" STREQUAL "NONE"))
target_sources(
FLAC
PRIVATE
src/fixed_intrin_avx2.c
src/fixed_intrin_sse2.c
src/fixed_intrin_sse42.c
src/fixed_intrin_ssse3.c
src/lpc_intrin_avx2.c
src/lpc_intrin_fma.c
src/lpc_intrin_sse2.c
src/lpc_intrin_sse41.c
src/stream_encoder_intrin_avx2.c
src/stream_encoder_intrin_sse2.c
src/stream_encoder_intrin_ssse3.c
)

if(MSVC AND NOT ("${TIM41_X86_SIMD_LEVEL}" MATCHES "^AVX.*"))
set_source_files_properties(
src/fixed_intrin_avx2.c
src/lpc_intrin_avx2.c
src/lpc_intrin_fma.c
src/stream_encoder_intrin_avx2.c
PROPERTIES
COMPILE_OPTIONS /arch:AVX2
)
endif()
endif()

target_link_libraries(FLAC ogg)
Expand Down
Loading

0 comments on commit f98b16b

Please sign in to comment.