summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-07-03 18:26:29 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-07-06 17:44:01 +0200
commit26fbf8082c072c13f7fbe976102dd81d95f22b28 (patch)
tree85922358461e7e8be1f769c825099400d2122391 /cmake
parentdd775972527f1be31ddd9db906619c593bb29002 (diff)
CMake: Support configure -force_debug_info
Task-number: QTBUG-85373 Change-Id: Ia798fc2cf715aed9157e1d9e2f64187c16e38bcf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake6
1 files changed, 6 insertions, 0 deletions
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}")