Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
93c389ce
Commit
93c389ce
authored
3 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] Disable -march flag on Apple ARM processors.
parent
8f7cae96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/cmake/CompilerSetup.cmake
+5
-1
5 additions, 1 deletion
scripts/cmake/CompilerSetup.cmake
with
5 additions
and
1 deletion
scripts/cmake/CompilerSetup.cmake
+
5
−
1
View file @
93c389ce
...
@@ -23,6 +23,10 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
...
@@ -23,6 +23,10 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
set
(
COMPILER_IS_MSVC TRUE CACHE BOOL
""
)
set
(
COMPILER_IS_MSVC TRUE CACHE BOOL
""
)
endif
()
# CMAKE_CXX_COMPILER_ID
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
# GNU-like compiler
if
(
COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL
)
if
(
COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL
)
if
(
NOT CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
if
(
NOT CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
...
@@ -71,7 +75,7 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
...
@@ -71,7 +75,7 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
set
(
CPU_FLAGS -mavx2 -march=core-avx2
)
set
(
CPU_FLAGS -mavx2 -march=core-avx2
)
elseif
(
OGS_CPU_ARCHITECTURE STREQUAL
"generic"
)
elseif
(
OGS_CPU_ARCHITECTURE STREQUAL
"generic"
)
set
(
CPU_FLAGS -mtune=generic
)
set
(
CPU_FLAGS -mtune=generic
)
else
(
)
else
if
(
NOT APPLE_ARM
)
set
(
CPU_FLAGS -march=
${
OGS_CPU_ARCHITECTURE
}
)
set
(
CPU_FLAGS -march=
${
OGS_CPU_ARCHITECTURE
}
)
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment