Skip to content

Commit

Permalink
[INFRA] native also works for gcc13
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Sep 18, 2024
1 parent ef45b19 commit cef2fdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/configuration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,18 @@ else ()
set (HIBF_IS_DEBUG FALSE)
endif ()

# Apple M1 with GCC sets `march=apple-m1` when using `-march=native`. This option is only available with GCC >= 14.
# Apple M1 with GCC sets `-march=apple-m1` when using `-march=native`. This option is only available with GCC >= 13.
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm64"
AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
set (HIBF_M1_NO_NATIVE TRUE)
else ()
set (HIBF_M1_NO_NATIVE FALSE)
endif ()

option (HIBF_NATIVE_BUILD "Optimize build for current architecture." ON)
if (HIBF_M1_NO_NATIVE)
hibf_config_print ("Optimize build: disabled (Apple M1 with GCC < 14)")
hibf_config_print ("Optimize build: disabled (Apple M1 with GCC < 13)")
elseif (HIBF_IS_DEBUG)
hibf_config_print ("Optimize build: disabled")
elseif (HIBF_NATIVE_BUILD)
Expand Down

0 comments on commit cef2fdd

Please sign in to comment.