Advertise CMAKE_BUILD_TYPE
Summary
The build instructions currently always use the default (empty) CMAKE_BUILD_TYPE
. This setting requests no optimization or debug symbols. We should advertise the existing options Debug
, MinSizeRel
, Release
and RelWithDebInfo
. They correspond to the following compiler flags:
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG -g
CMAKE_CXX_FLAGS_MINSIZEREL -Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE -O2 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG
We should probably not enable optimizations for debug builds (currently we always enable LTO).