summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Rudge <owen@owenrudge.net>2021-01-07 16:04:01 +0000
committerOwen Rudge <owen@owenrudge.net>2021-01-08 16:58:14 +0000
commitbbc96fd37c56a7bf69d4c0a8c7b8e5cc89a0a16d (patch)
treeda3f85ec1eb8c7f69e321d1a99a700f11295e5b8
parent188bf0fbc92b26cbbd5bcd67c5352ab7f6ad769b (diff)
downloadopenttd-bbc96fd37c56a7bf69d4c0a8c7b8e5cc89a0a16d.tar.xz
Fix: Don't add -mno-sse4 on arm64
-rw-r--r--cmake/CompileFlags.cmake18
1 files changed, 10 insertions, 8 deletions
diff --git a/cmake/CompileFlags.cmake b/cmake/CompileFlags.cmake
index f0b8af061..772041a42 100644
--- a/cmake/CompileFlags.cmake
+++ b/cmake/CompileFlags.cmake
@@ -129,14 +129,16 @@ macro(compile_flags)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
- include(CheckCXXCompilerFlag)
- check_cxx_compiler_flag("-mno-sse4" NO_SSE4_FOUND)
-
- if(NO_SSE4_FOUND)
- add_compile_options(
- # Don't use SSE4 for general sources to increase compatibility.
- -mno-sse4
- )
+ if (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
+ include(CheckCXXCompilerFlag)
+ check_cxx_compiler_flag("-mno-sse4" NO_SSE4_FOUND)
+
+ if(NO_SSE4_FOUND)
+ add_compile_options(
+ # Don't use SSE4 for general sources to increase compatibility.
+ -mno-sse4
+ )
+ endif()
endif()
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")