Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RelWithDebInfo support #10

Merged
merged 5 commits into from
May 16, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enable_testing()
# User options #
########################

set(BUILD_TYPE_VALUES Debug Release)
set(BUILD_TYPE_VALUES Debug Release RelWithDebInfo)
if (CMAKE_CONFIGURATION_TYPES) # multi-config generators like MSVC
set(CMAKE_CONFIGURATION_TYPES ${BUILD_TYPE_VALUES} CACHE TYPE INTERNAL FORCE)
else()
Expand Down Expand Up @@ -157,9 +157,11 @@ endif()

set(CMAKE_C_FLAGS_DEBUG "${C_debug} ${C_checked}")
set(CMAKE_C_FLAGS_RELEASE "${C_optimized}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${C_debug} ${C_checked} ${C_optimized}")
dmey marked this conversation as resolved.
Show resolved Hide resolved
set(CMAKE_C_FLAGS "${C_other}")
set(CMAKE_Fortran_FLAGS_DEBUG "${Fortran_debug} ${Fortran_checked}")
set(CMAKE_Fortran_FLAGS_RELEASE "${Fortran_optimized}")
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${Fortran_optimized} ${Fortran_debug}")
set(CMAKE_Fortran_FLAGS "${Fortran_preprocess} ${Fortran_io} ${Fortran_other}")

if (OPTIMIZE_C)
Expand All @@ -169,6 +171,8 @@ endif()
if (ENABLE_RUNTIME_CHECKS)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${C_checked}")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} ${Fortran_checked}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${C_checked}")
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO} ${Fortran_checked}")
endif()

if (SAVE_TEMPS)
Expand Down