This makes a difference when projects compare things like
CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR and the source
directory has a trailing slash in the GUI. The command line cmake invocation
cleans the paths at the beginning, so such comparisons return true. But the
GUI currently passes the paths unmodified, so such comparisons return false.
Change the logic to sanitize the paths used through the GUI in the same way
that the command line invocation does.
Fixes: #21421
MSVC 14.38+ toolsets deprecate `stdext::checked_array_iterator`.
Support building with versions of Qt that have not been updated
to avoid the deprecated API.
Qt-Issue: https://bugreports.qt.io/browse/QTBUG-118993
9d13674337 cmake-gui: Hint that the preset compilers will be used
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9125
Instead of stating that the default is the native compilers,
say we will use the compilers from the preset. This makes it
more clear that the preset is working as expected.
There is no need for them cuz:
- the last field has a default value
- all static instances use 2 arguments convertible to `std::string`
- "dynamic" instances used for _Generator_ doc entries access
fields diectly using default constructed instance
Moreover, compiler may generate move ctor/assign when needed.
Use fixed size arrays of `cmDocumentationEntry` items instead of
open arrays of two `char` pointers when describe program options
help screens.
Also, drop `const char*[][2]` overloads of methods of
`cmDocumentation` and `cmDocumentationSection` classes in the sake
of generic (template) appenders introduced earlier.
ec76a9c22f cmake-gui: Restore embedded version information in Windows binary
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7895
Refactoring in commit 89a1e1c1be (Build: Link w/ `OBJECT` library is OK
since 3.12, 2022-08-21, v3.25.0-rc1~97^2~19) dropped the `.res` object
containing this information from the `cmake-gui` link line. Restore it.
In commit 4ff8604604 (Build: Do not use variables for sources lists,
2022-08-21) the sources of `CMakeLib` were accidentally made PUBLIC.
This causes them to be compiled again in all consuming targets.
Make the sources PRIVATE instead.
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.
Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
Since commit baead1e2a8 (Encoding: Remove option to use ANSI code page
internally, 2016-11-01, v3.8.0-rc1~358^2), we always use UTF-8 strings
internally. Using fromLocal8Bit/toLocal8Bit + QTextCodec is no longer
needed. Convert to fromStdString/toStdString instead, which should work
both with Qt5 and Qt6.
Fixes: #23565
Restore the logic removed by commit 035078d847 (cmake-gui: Remove
explicit locale setup, 2020-12-17, v3.20.0-rc1~205^2~6), but only with
Qt5 on Windows. Leave a FIXME comment to support Qt6 later.
Fixes: #23562
Issue: #23565
Since commit 8fb74f97ef (ENH: Use fixed pitch font in output window,
2008-03-07), cmake-gui has been using a "Courier" font to print mono
spaced text in the output window, but at least in macOS 12, Courier
is no longer availablemand therefore will print the following warning
in the invoking terminal:
qt.qpa.fonts: Populating font family aliases took 175 ms. Replace uses of missing font family "Courier" with one that exists to avoid this cost.
Change it to use "Courier New" instead, which has been provided as an
automatically selected alternative in Windows and comes preinstalled
in both systems, and add a hint to pull another monospaced font if not.
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
In v3 of the presets, generator and buildDir can be omitted to fall
back to regular cmake behavior when these values are not explicitly
provided by the user.
Fixes: #21987
Since these changes:
* commit f1de6f6682 (cmake-gui: Support building against Qt6,
2020-12-17, v3.20.0-rc1~205^2~7)
* commit 134d69121e (cmake-gui: Restore search bar for cache view and
environment dialog, 2021-02-22, v3.20.0-rc2~12^2)
the search bar is no longer case insensitive when using Qt 5.12.[0-1],
and possibly some later versions. It works as of Qt 5.15 though, so
update our version check accordingly.
Fixes: #21884
Remove style sheet from a combo box in the GUI. I have no idea why this
was being set, but it causes a render glitch. Also, use a more sensible
size policy on the same widget.