diff options
| author | Joerg Bornemann <joerg.bornemann@qt.io> | 2025-12-01 09:59:16 +0100 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2025-12-01 18:19:30 +0100 |
| commit | c61d900303c20750d67498b646e095669a890374 (patch) | |
| tree | 7ce64d6a08f0598d6fc72de12f8d2db9e09c467c /src/tools/qdoc/config.cpp | |
| parent | d6549f4781ea7d0023cf5b1b47d5b7f3139c9e0e (diff) | |
CMake: Replace qt_set01 with explicit if() conditions
The qt_set01 function had a critical argument quoting flaw. This
happened because CMake removes quotes when calling the function, causing
variable substitution in the condition evaluation. For example, calling
qt_set01(QNX CMAKE_SYSTEM_NAME STREQUAL "QNX") with QNX already set to 1
would evaluate CMAKE_SYSTEM_NAME STREQUAL QNX (where QNX expands to 1)
instead of CMAKE_SYSTEM_NAME STREQUAL "QNX".
This particularly affected users with QNX toolchains that pre-set the
QNX variable, causing configure to fail.
Replace all qt_set01 calls with explicit if/else blocks that properly
preserve string literals and avoid the eval-like behavior. Remove the
qt_set01 function.
The platform detection code is now admittedly more verbose but plain
CMake without argument quoting pitfalls.
Pick-to: 6.8 6.10
Fixes: QTBUG-142267
Change-Id: I642fc8582001b8c7b7b6ff56eae7ccabc89ba565
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/tools/qdoc/config.cpp')
0 files changed, 0 insertions, 0 deletions
