Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tools
frackit
Commits
8f6d4824
Commit
8f6d4824
authored
Nov 12, 2020
by
Dennis Gläser
Browse files
[cmake] allow other compiler flags for docker build
parent
fa10554a
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
8f6d4824
...
...
@@ -20,9 +20,17 @@ set(CMAKE_CXX_STANDARD 17)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O0 -g -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"$GXX_RELEASE_OPTS $GXX_RELEASE_WARNING_OPTS -g -ggdb -Wall"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS
}
-std=c++17 -O3 -g0 -Wall \
-funroll-loops
-march=native
\
-funroll-loops \
-DNDEBUG=1 -fno-strict-aliasing \
-fstrict-overflow -fno-finite-math-only"
)
# if building for a docker container, do not use native flag
option
(
CONFIG_FOR_DOCKER
"Use compiler flags suitable for docker container"
OFF
)
if
(
CONFIG_FOR_DOCKER
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
-march=x86-64 -mtune=generic"
)
else
()
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
-march=native"
)
endif
()
set
(
CMAKE_BUILD_TYPE Release
)
# Find OpenCascade
...
...
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