Skip to content

Commit

Permalink
build: fix flags for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Nov 18, 2024
1 parent 48fdbf2 commit b9a5aa4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,16 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj ")
else()
ucm_add_flags(CXX "-fno-sized-deallocation -fno-omit-frame-pointer")
ucm_add_flags(C CXX "-mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt")
if(KLOGG_GENERIC_CPU)
ucm_add_flags(C CXX "-march=x86-64 -mtune=generic")
else()

if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm64")
ucm_add_flags(C CXX "-march=native -mtune=generic")
else()
ucm_add_flags(C CXX "-mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt")
if(KLOGG_GENERIC_CPU)
ucm_add_flags(C CXX "-march=x86-64 -mtune=generic")
else()
ucm_add_flags(C CXX "-march=native -mtune=generic")
endif()
endif()
endif(MSVC)

Expand Down

0 comments on commit b9a5aa4

Please sign in to comment.