Summary
We would like to be able to use the build type RelWithDebInfo when compiling with CMake. In other words, with optimizations and with debug info.
Motivation
- Does this affect any team outside of WT?
No
- Is this issue urgent?
Not really but increases the team productivity as we could set flags faster.
Acceptance Criteria (Definition of Done)
Be able to use -DCMAKE_BUILD_TYPE=RelWithDebInfo when configuring the build.
We might want to update any documentation where the build types are mentioned.
Suggested Solution
diff --git a/cmake/configs/modes.cmake b/cmake/configs/modes.cmake index c518a8c2a..1d0bb897a 100644 --- a/cmake/configs/modes.cmake +++ b/cmake/configs/modes.cmake @@ -5,7 +5,7 @@ include(CheckCXXCompilerFlag) include(${CMAKE_SOURCE_DIR}/cmake/helpers.cmake) # Establish an internal cache variable to track our custom build modes. -set(BUILD_MODES None Debug Release CACHE INTERNAL "") +set(BUILD_MODES None Debug Release RelWithDebInfo CACHE INTERNAL "")
Not sure about the following:
diff --git a/cmake/configs/base.cmake b/cmake/configs/base.cmake index d3df936e5..e5fbdfad8 100644 --- a/cmake/configs/base.cmake +++ b/cmake/configs/base.cmake @@ -248,7 +248,7 @@ config_string( DEFAULT "\"${WT_VERSION_STRING}\"" ) -if(HAVE_DIAGNOSTIC AND (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")) +if(HAVE_DIAGNOSTIC AND (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))