diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,6 +24,12 @@ include(AddCompilerFlags) remove_compiler_flags(-DNDEBUG) +# Default to RelWithDebInfo configuration +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING + "Select the configuration for the build" FORCE) +endif() + # Ensure that WINDRES_PREPROC is enabled when using windres. if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC")