[Development] Proposing CMake as build tool for Qt 6
Joerg.Bornemann at qt.io
Mon Jun 17 09:04:10 CEST 2019
On 6/15/19 12:06 PM, Sérgio Martins via Development wrote:
> The current definition of "debug" for MSVC Qt is:
> 1) Unoptimized (via /O flags)
> 2) Has debug symbols
> 3) Links to another c++ runtime library, which lets you debug into
> (/MDd). (And this is what prevents you from mixing release Qt with debug
> The idea above would be to drop 3). On linux you don't link to a debug
> libstdc++ either and you don't complain :)
> But there might be problems:
> - cmake -DCMAKE_BUILD_TYPE=Debug means /MDd ?
> - The _DEBUG macro currently comes from /MDd, some users might be using
> it to detect debug builds.
> - MDd is useful to enable asserts in the C++ library. This argument is
> strong on Windows, as you don't have valgrind there (or at least an
> equivalent that doesn't suck too much).
This will break every user project that's build in debug mode with
Visual Studio's toolchain (whichever currently available build tool you
use), because it builds by default with /MDd and will be incompatible
with Qt. I fear we have to accept what this environment forces upon us.
More information about the Development