aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-12-22 11:20:43 +0100
committerEike Ziller <eike.ziller@qt.io>2020-12-22 13:02:03 +0000
commit0f9a206bd55935d1c33260ad820a9599c3317490 (patch)
tree23c598d3a7c19266ad6f6f0b2a59ceb78b1be04f /cmake
parent03274561e963969a9b0f6d98b294c9b0b6d07b6e (diff)
cmake build: Make separate debug info optional
In the CMake build in general, but still use it for RelWithDebInfo builds with the build*.py scripts. Fixes: QTCREATORBUG-25151 Change-Id: I8414f953278ebb395f73414c12af0ed7bd4fcdbe Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtCreatorAPI.cmake1
-rw-r--r--cmake/QtcSeparateDebugInfo.cmake4
2 files changed, 3 insertions, 2 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake
index fcbb67e735..5e88b57512 100644
--- a/cmake/QtCreatorAPI.cmake
+++ b/cmake/QtCreatorAPI.cmake
@@ -36,6 +36,7 @@ set(_THIS_MODULE_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
option(BUILD_PLUGINS_BY_DEFAULT "Build plugins by default. This can be used to build all plugins by default, or none." ON)
option(BUILD_EXECUTABLES_BY_DEFAULT "Build executables by default. This can be used to build all executables by default, or none." ON)
option(BUILD_LIBRARIES_BY_DEFAULT "Build libraries by default. This can be used to build all libraries by default, or none." ON)
+option(QTC_SEPARATE_DEBUG_INFO "Extract debug information from binary files." OFF)
function(qtc_plugin_enabled varName name)
if (NOT (name IN_LIST __QTC_PLUGINS))
diff --git a/cmake/QtcSeparateDebugInfo.cmake b/cmake/QtcSeparateDebugInfo.cmake
index 7cc8ff3f0d..768e297461 100644
--- a/cmake/QtcSeparateDebugInfo.cmake
+++ b/cmake/QtcSeparateDebugInfo.cmake
@@ -3,9 +3,9 @@ set(CMAKE_CURRENT_FUNCTION_LIST_DIR ${CMAKE_CURRENT_LIST_DIR})
endif()
# Enable separate debug information for the given target
-# when doing RelWithDebInfo build
+# when QTC_SEPARATE_DEBUG_INFO is set
function(qtc_enable_separate_debug_info target installDestination)
- if (NOT CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
+ if (NOT QTC_SEPARATE_DEBUG_INFO)
return()
endif()
if (NOT UNIX AND NOT MINGW)