Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
predictable_parallel_patterns
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
edae8f27
authored
5 years ago
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'native architecture' optimization flag.
parent
4e135d7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
cmake/SetupOptimizationLevel.cmake
+6
-7
No files found.
cmake/SetupOptimizationLevel.cmake
View file @
edae8f27
...
@@ -4,22 +4,22 @@
...
@@ -4,22 +4,22 @@
#################################################################################
#################################################################################
# make sure a build type is set, default to release
# make sure a build type is set, default to release
if
(
NOT CMAKE_BUILD_TYPE
)
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE Release
)
set
(
CMAKE_BUILD_TYPE Release
)
endif
()
endif
()
message
(
"-- Using Build Type: "
${
CMAKE_BUILD_TYPE
}
)
message
(
"-- Using Build Type: "
${
CMAKE_BUILD_TYPE
}
)
# Enable optimizations in release builds
# Enable optimizations in release builds
if
(
CMAKE_BUILD_TYPE STREQUAL
"Release"
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Release"
)
# Link time optimization
# Link time optimization
set
(
CMAKE_CXX_FLAGS
"-Wall -Wextra"
)
set
(
CMAKE_CXX_FLAGS
"-Wall -Wextra"
)
# -O2 is often seen as 'the most speed',
# -O2 is often seen as 'the most speed',
# but inlining functions and SIMD/Vectorization is
# but inlining functions and SIMD/Vectorization is
# only enabled by -O3, thus it's way faster in some
# only enabled by -O3, thus it's way faster in some
# array calculations.
# array calculations.
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O3"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O3
-march=native
"
)
set
(
CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE
)
set
(
CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE
)
else
()
else
()
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g -O0"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g -O0"
)
endif
()
endif
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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