mirror of https://github.com/qt/qtbase.git
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 |
||
---|---|---|
.github/workflows | ||
LICENSES | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake |