diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 63e168af90..1a2dff080f 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -112,6 +112,8 @@ while(configure_args) set(build_configs "Debug") elseif(arg STREQUAL "-debug-and-release") set(build_configs Debug Release) + elseif(arg STREQUAL "-force-debug-info") + set(force_debug_info ON) elseif(arg STREQUAL "--") # Everything after this argument will be passed to CMake verbatim. push(${configure_args}) @@ -121,6 +123,10 @@ while(configure_args) endif() endwhile() +if(force_debug_info) + list(TRANSFORM build_configs REPLACE "^Release$" "RelWithDebInfo") +endif() + list(LENGTH build_configs nr_of_build_configs) if(nr_of_build_configs EQUAL 1) push("-DCMAKE_BUILD_TYPE=${build_configs}")