Qt Base (Core, Gui, Widgets, Network, ...)
Go to file
Alexandru Croitor 5b5fa7b75a CMake: Fix sqldrivers project to allow building as Debug MSVC config
When the user:
- has a non-developer-build -debug-and-release Qt
- and tries to configure the sqldrivers project with
  -DCMAKE_BUILD_TYPE=Debug
our build system discarded the user request, and defaulted to
'Release'.

That happens because CMake sets CMAKE_BUILD_TYPE_INIT to 'Debug' by
default on Windows-MSVC, and we have no marker to differentiate
that the 'Debug' value was user-specified.

We have such a marker
- via the
  __qt_auto_detect_cmake_build_type_before_project_call variable
  when configuring qtbase / top-level qt
- via the
  __qt_toolchain_cmake_build_type_before_project_call variable when
  configuring via the qt toolchain file (although that doesn't apply
  when configuring a multi-config build for obscure reasons, which
  should be addressed).

A conservative fix is to add a new variable / marker called
__qt_internal_standalone_project_cmake_build_type_before_project_call
which the 'sqldrivers' project will set with the build type that is
detected before the first project() call, and use that to decide
whether to override the build type, similar how we do with toolchain
file variable.

We could reuse one of the previous variables, but I figured it's better
to be explicit with a new one. And hopefully we can clean up the whole
logic in a follow-up commit.

Amends 48841c34d2
Amends 8c912cddeb

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-120436
Task-number: QTBUG-114958
Change-Id: I37e3d8041088fe6084a9976ecc80ddd62d73ef81
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-01-23 14:26:21 +01:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES Clarify license of SHA-1 algorithm 2023-04-26 16:36:18 +02:00
bin CMake: Don't strip debug builds with qt-cmake-private-install in CI 2023-11-03 18:24:46 +02:00
cmake CMake: Fix sqldrivers project to allow building as Debug MSVC config 2024-01-23 14:26:21 +01:00
coin Coin: Add native MSVC ARM64 instructions 2023-12-18 20:00:44 +02:00
config.tests Remove the mandatory x86-64 features from its feature list 2023-05-31 14:55:37 -07:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Doc: Update copyright year to 2024 2024-01-22 14:51:21 +00:00
examples Examples/sqlbrowser: improve coding style 2024-01-19 17:27:25 +01:00
lib
libexec CMake: Add a config.redo script similar to qt5's config.status 2023-09-20 21:20:13 +02:00
mkspecs wasm: set MAXIMUM_MEMORY to 4GB 2023-12-20 00:44:28 +00:00
qmake Remove build machine path that was baked into the qmake binary 2023-12-13 06:56:48 +00:00
src CMake: Fix sqldrivers project to allow building as Debug MSVC config 2024-01-23 14:26:21 +01:00
tests QWidget: Clean up state that depends on QWindow from ~QWidgetWindow() 2024-01-23 12:56:54 +00:00
util Prepare to support taking CLDR data from its github upstream 2024-01-19 15:38:25 +01:00
.cmake.conf Bump version to 6.8.0 2023-12-11 17:35:40 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt CMake: Fix find_package(Qt6*Tools) in non-qtbase tests 2023-08-23 16:21:58 +02:00
config_help.txt Update config_help.txt with -trace ctf 2023-12-09 12:05:24 +02:00
configure configure: Make sure the configure script exits with cmake's exit code 2023-11-22 05:34:28 +01:00
configure.bat CMake: Add a config.redo script similar to qt5's config.status 2023-09-20 21:20:13 +02:00
configure.cmake CMake: Fix Threads global promotion issue when using static openssl 2024-01-22 14:18:09 +01:00
dependencies.yaml
qt_cmdline.cmake Add coverage and coverage-gcov features 2023-09-22 15:54:30 +02:00