mirror of https://gitlab.com/QEF/q-e.git
Add CMake build flags presets
This commit is contained in:
parent
b6af940d20
commit
3d4d58e0bb
|
@ -0,0 +1,9 @@
|
|||
# Provide a human-friendly debug experience by keeping symbols and stack frames
|
||||
|
||||
set(flags "-Og -g -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
|
||||
# Debug
|
||||
set(CMAKE_C_FLAGS_DEBUG "${flags}" CACHE STRING "")
|
||||
set(CMAKE_Fortran_FLAGS_DEBUG "${flags}" CACHE STRING "")
|
||||
|
||||
unset(flags)
|
|
@ -0,0 +1,14 @@
|
|||
# Auto-detect uarch of the build machine and automatically codegen for it
|
||||
# Be aware that resulting binaries will be unportable even across same arch but different uarch
|
||||
|
||||
set(flags "-O3 -DNDEBUG -march=native -mtune=native")
|
||||
|
||||
# Release
|
||||
set(CMAKE_C_FLAGS_RELEASE "${flags}" CACHE STRING "")
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "${flags}" CACHE STRING "")
|
||||
|
||||
# RelWithDebInfo
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${flags} -g" CACHE STRING "")
|
||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${flags} -g" CACHE STRING "")
|
||||
|
||||
unset(flags)
|
Loading…
Reference in New Issue