File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ target_sources(dsd-neo_dsp PRIVATE
2222 sync_calibration.c
2323)
2424
25+ set (_dsd_neo_dsp_target_arch "${CMAKE_SYSTEM_PROCESSOR} " )
26+ if (APPLE AND CMAKE_OSX_ARCHITECTURES)
27+ list (LENGTH CMAKE_OSX_ARCHITECTURES _dsd_neo_osx_arch_count)
28+ if (_dsd_neo_osx_arch_count EQUAL 1)
29+ list (GET CMAKE_OSX_ARCHITECTURES 0 _dsd_neo_dsp_target_arch)
30+ endif ()
31+ endif ()
32+
2533# x86-64 SIMD sources with arch-specific flags
26- if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|amd64" )
34+ if (_dsd_neo_dsp_target_arch MATCHES "x86_64|AMD64|amd64" )
2735 target_sources (dsd-neo_dsp PRIVATE simd_fir_sse2.cpp)
2836 target_sources (dsd-neo_dsp PRIVATE simd_widen_sse2.cpp)
2937 # Explicit SSE2 flag for clarity and cross-compilation safety
@@ -56,7 +64,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|amd64")
5664endif ()
5765
5866# ARM64 NEON (always available on AArch64)
59- if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64" )
67+ if (_dsd_neo_dsp_target_arch MATCHES "aarch64|arm64|ARM64" )
6068 target_sources (dsd-neo_dsp PRIVATE simd_fir_neon.cpp)
6169 target_sources (dsd-neo_dsp PRIVATE simd_widen_neon.cpp)
6270endif ()
You can’t perform that action at this time.
0 commit comments