Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Announcement:
OGS Community Meeting 2022 in September
Open sidebar
ogs
ogs
Commits
93c389ce
Commit
93c389ce
authored
Aug 26, 2021
by
Lars Bilke
Browse files
[CMake] Disable -march flag on Apple ARM processors.
parent
8f7cae96
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/cmake/CompilerSetup.cmake
View file @
93c389ce
...
...
@@ -23,6 +23,10 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
set
(
COMPILER_IS_MSVC TRUE CACHE BOOL
""
)
endif
()
# CMAKE_CXX_COMPILER_ID
if
(
APPLE AND
"
${
CMAKE_SYSTEM_PROCESSOR
}
"
STREQUAL
"arm64"
)
set
(
APPLE_ARM TRUE CACHE BOOL
"Apple M processors"
FORCE
)
endif
()
# GNU-like compiler
if
(
COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL
)
if
(
NOT CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
...
...
@@ -71,7 +75,7 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
set
(
CPU_FLAGS -mavx2 -march=core-avx2
)
elseif
(
OGS_CPU_ARCHITECTURE STREQUAL
"generic"
)
set
(
CPU_FLAGS -mtune=generic
)
else
(
)
else
if
(
NOT APPLE_ARM
)
set
(
CPU_FLAGS -march=
${
OGS_CPU_ARCHITECTURE
}
)
endif
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment