c++ - Debug vs Release in CMake - Stack Overflow
stackoverflow.com › questions › 7724569Sep 12, 2018 · Release / Debug will add the appropriate flags for your compiler. There are also RelWithDebInfo and MinSizeRel build configurations. You can modify/add to the flags by specifying a toolchain file in which you can add CMAKE_<LANG>_FLAGS_<CONFIG>_INIT variables, e.g.: set (CMAKE_CXX_FLAGS_DEBUG_INIT "-Wall") set (CMAKE_CXX_FLAGS_RELEASE_INIT "-Wall")