Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INFRA] native also works for gcc13 #233

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading