Commit Graph

76 Commits

Author SHA1 Message Date
Marco Bubke
3bf918e293 Increase concept diagnostics depth only for C++
Before it was tested if the C++ compiler would be GCC. It was not
testing if the compiler would be C++.

Fixes: QTCREATORBUG-32583
Change-Id: I2ca3614dc4a429bc594fade81b86cedceb2ef98c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2025-03-06 15:07:49 +00:00
Marco Bubke
8e196c9e39 Increase concept diagnostic depth to 8
Reading concept errors is sometimes quite hard because they say that the
constraint was failing but not why. With a deeper diagnostic stack, it
is easier to understand why it was failing.

Change-Id: I863a23457bea390f50f9c458b5e82a24e17a26ea
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2025-02-21 10:57:53 +00:00
David Faure
edc97456e2 Hide CMake warning about GNUInstallDirs being called too early
This means the libdir is always "lib", which is incorrect, but too
scary to change in the 15.0 branch. Let's work on a proper fix in master.

CMake Warning (dev) at /usr/share/cmake/Modules/GNUInstallDirs.cmake:253 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known.  Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
cmake/QtCreatorAPIInternal.cmake:81 (include)
cmake/QtCreatorAPI.cmake:8 (include)
CMakeLists.txt:21 (include)

Change-Id: I6085e8bac47922bd333e4e4a3b93d7e7aea88b78
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2025-01-30 09:16:30 +00:00
Cristian Adam
f218886cbc Qt Creator CMakeAPI: do not set -undefined on Apple
It gives a warning saying that -undefined is deprecated.

Change-Id: I9652b4dab1838d3e6eca9f719efbb18ffccf7a89
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2025-01-17 09:32:38 +00:00
Cristian Adam
317adcbf81 Qt Creator CMake API: Treat OBJECT libraries as normal libraries
The code had a workaround for CMake versions older than 3.12.

CMake starting with version 3.12 treats OBJECT libraries like other
library types when using target_link_libraries.

Change-Id: I422fa78a53cf97c6ec6481a876f901a56bf54e05
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2025-01-16 13:20:24 +00:00
Eike Ziller
f6831d0645 Raise Qt requirement for building Qt Creator to Qt 6.5.3
And remove some version checks.
Qt 6.8 is released and Qt 6.5 and 6.8 are LTS.
This enables us to use some newer APIs like Qt::ColorScheme.

Change-Id: Ibdeeb933bb8e9fa2d1a02fba3e3f0b868747e763
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-12-19 15:35:27 +00:00
Tim Jenssen
1e53f104d4 Merge remote-tracking branch 'origin/qds/dev'
add QWidget include in src/plugins/qmldesigner/libs/designercore/model/model.cpp

prepare src/plugins/lua/CMakeLists.txt if lua plugin is not built

Necessary change in:
src/plugins/qmldesigner/components/toolbar/messagemodel.h

Because Utils::Id is a friend of qHash now, QtCreator API
removed uniqueIdentifier().

std::unordered_map<quintptr, ProjectExplorer::TaskCategory>
->
QHash<Utils::Id, ProjectExplorer::TaskCategory> m_categories = {};

other resolved Conflicts were in:
	cmake/QtCreatorAPI.cmake
	cmake/QtCreatorAPIInternal.cmake
	share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl
	share/qtcreator/templates/wizards/projects/qtquickapplication/wizard.json
	src/plugins/effectcomposer/effectcomposerview.cpp
	src/plugins/effectcomposer/effectcomposerwidget.cpp
	src/plugins/qmldesigner/components/assetslibrary/assetslibraryview.cpp
	src/plugins/qmldesigner/components/assetslibrary/assetslibrarywidget.cpp
	src/plugins/qmldesigner/components/contentlibrary/contentlibrarywidget.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dview.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
	src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
	src/plugins/qmldesigner/designmodecontext.cpp
	src/plugins/qmldesigner/designmodewidget.cpp
	src/plugins/qmldesigner/qmldesignerplugin.cpp
	src/plugins/qmlprojectmanager/buildsystem/projectitem/converters.cpp
	src/plugins/qmlprojectmanager/qmlprojectmanager.qbs
	src/plugins/studiowelcome/examplecheckout.h

Change-Id: Ia6c204460baf4de886e45666d859ca048d578bcb
2024-09-25 15:20:01 +02:00
Eike Ziller
e4431beb8c Build: Get rid of custom dependency tracking for plugins
Instead of PUBLIC_DEPENDS, our build system would keep record and track
recursive plugin dependencies manually, by attaching a custom property
to the targets that reference the targets it depends on. Then it used
DEPENDS to add all these recursive dependencies.

Get rid of this custom reimplementation of PUBLIC_DEPENDS and just use
that instead. This needs a fix that we should not separately export the
licensechecker plugin when doing a super-repository build. Otherwise
external plugins configured with the result cannot find the licensechecker
target, which is referenced by the vxworks target that is exported
together with the QtCreatorConfig.

Change-Id: I1444a0b16e5519f5310f9c0ffdfc49481ac228a4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-09-18 05:55:36 +00:00
Eike Ziller
452d65b727 Fix build of external plugins
They refer to targets with the QtCreator:: prefix, but the dependency
information that we add as a custom property does not have that. So we
need to add the prefix if needed.

Change-Id: Ib202865a56f6530b8ae5973f635a81f53fcb4219
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-09-04 14:40:33 +00:00
Eike Ziller
6f2572a5f5 Export Qt Creator's special properties
That we add to plugin targets, so these are also available when building
external plugins. Helps for e.g. recursive PLUGIN_DEPENDS.

Change-Id: I89b10a58a9aa3ceb720c0dff4b76564d1cb06ca3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-09-03 10:52:14 +00:00
Marco Bubke
40f462cf07 Enforce that plugins can't be used as library dependencies
We want to use the libraries in different projects where the plugins
are not present.

Change-Id: I51382ac7cfcf06871ac99a6b53b84840ca39bf00
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-09-02 14:24:58 +00:00
Thomas Hartmann
88323e429f Revert "Enforce that plugins can't be used as library dependencies"
This reverts commit f5bb913c9d.

Reason for revert: This breaks snapshots build for the license plugin

Change-Id: I52a9f0b40081d648de68a5bdc3d9b3962e19061a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-08-30 12:08:17 +00:00
Marco Bubke
f5bb913c9d Enforce that plugins can't be used as library dependencies
We want to use the libraries in different projects where the plugins
are not present.

Change-Id: Ia3b183dcf57c7c63c75a17e9d5e3c3ef672e668e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-08-29 10:13:33 +00:00
Tim Jenssen
b4061e223e Merge remote-tracking branch 'origin/qds/dev'
Change-Id: I907e067abba640d27313ce03bc41326d3ed750f0
2024-08-06 19:04:41 +02:00
hjk
851c69bea8 CMake: Adapt deprecation macros
Qt 6.8 has apparently changed from a *BEFORE to an *UP_TO naming scheme
in 816071d44012. As we need also pre-6.8 builds we better have both.

After talking the change's author it seems to be ok to use the same
numbers.

Change-Id: I451dc9ac9c842405f5f36a04079b4284a42a2378
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-18 11:32:13 +00:00
Tim Jenßen
93588dbee2 Merge remote-tracking branch 'origin/14.0' into qds/dev
Conflicts:
	doc/qtdesignstudio/src/how-to/qtdesignstudio-live-preview-desktop.qdoc
	qt_attributions.json
	src/libs/sqlite/CMakeLists.txt
	src/plugins/qmldesigner/CMakeLists.txt
	src/plugins/qmldesignerbase/QmlDesignerBase.json.in
	src/plugins/qmlprojectmanager/CMakeLists.txt
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.cpp
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.h

Change-Id: If33e41d8951a49acaba0a74c3e5848eef52bb945
2024-07-10 18:11:28 +02:00
Marco Bubke
95fc49c4ac Add compile options to cmake declarative interface
It offers an clean interface to disable warnings

Change-Id: Ia19360994d7ca439d067d2370d001d5aeae3999d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-05-28 18:22:11 +00:00
hjk
01568f5d75 Warn about deprecated Qt functionality (only) for Qt <= 6.4
These are the once that we could actually handle.

Change-Id: I3c49779e9aabee76d357285a9210062d580f01ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-24 07:29:53 +00:00
Marco Bubke
b07d2f0c1d Include Qt and GoogleTest as system include
That is silencing warnings in Qt and GoogleTest headers .

Change-Id: Ia6fda019c271788fbb341a8de0cf6d7b757f38bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-04-23 11:38:09 +00:00
Mathias Hasselmann
5be8110137 CMake: Fix MinGW builds with BUILD_WITH_PCH=OFF
Set the minimum required Windows version not only for PCH builds, but
also for builds without precompiled headers. While there also increase
the minimum required Windows version: Qt 6 already requires Windows 10.
Therefore its safe to require the same API level for Qt Creator.

Fixes: QTCREATORBUG-30189
Change-Id: Icbbc63657e3c64be1151dda06004234d56e33990
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-01-11 11:32:55 +00:00
Cristian Adam
edb8b0aeb7 CMake: Add QTC_USE_LLVM_LINKER option
llvm-link is faster on macOS than ld64. llvm-link can also be used with
MinGW GCC's ld which is very slow in debug mode.

Change-Id: Ie519f3111e05cfc7dffab2676108a0d53ebe08b2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-01-09 14:28:12 +00:00
Tim Jenssen
1a3a8ecc96 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Id242ab4ca485527defdcc1555d204e12e50ddb7a
2023-09-14 17:37:24 +02:00
Marco Bubke
9e60df9f7f CMake: Silence warning in third party code
Adding SYSTEM_INCLUDE for which you get no warnings. Fix
PUBLIC_SYSTEM_INCLUDE to work for all cases where PUBLIC_INLCUDES works.

Change-Id: I7059c2879004743c13c368220596081dd054407a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-07 08:53:43 +00:00
Marco Bubke
22166404f3 QmlDesigner: Use system includes for google test
System includes are silencing warnings.

Change-Id: I7d7954e01a28f94aa5983cfc44eba976d97b0311
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-23 10:50:09 +00:00
Cristian Adam
8642dd3b68 CMake: Fix build for Windows
The `env_with_default` function is part of Utils.cmake, which would need
to be deployed. But it can't be part of QtCreatorAPIInternal.cmake due
to its usage before the inclusion of QtCreatorAPIInternal.cmake in the
main QtCreator CMakeLists.txt file.

A sepparate function needs to do the task.

Amends 1036c776f5

Change-Id: I95344dd98c5fa0258303ed8d02855584a1945144
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-17 07:55:11 +00:00
Jarek Kobus
2732b6e939 Creator: Block the usage of foreach
Change-Id: I5557b1eccb8bd1e4acdc519ded799ce21c5be45e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-10 11:44:42 +00:00
Cristian Adam
80196abd6f CMake: Remove Windows 8 WINVER / _WIN32_WINNT defines
This was required for older MinGW toolchains.

Change-Id: I89e048adf01fa2b04c52715f71bf266cbd65c44e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-11 10:35:46 +00:00
Christian Kandeler
b12ba08de0 Build systems: Do not put qbs plugins under the qtcreator plugins dir
Otherwise, the extension system will unnecessarily try to load them at
start-up.

Change-Id: I7a932904835cb387e3cf10924ca79a58e5f92b33
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-28 11:22:59 +00:00
Orgad Shaneh
1512aaa0cd Build: Avoid passing unsupported flag to MSVC linker
Change-Id: Ia73aeccb824bca10ce928cb82d5ad77033521527
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-16 09:45:46 +00:00
Eike Ziller
30bd12d8dc Build: Add SOURCES_PROPERTIES to extend_qtc_target
This way the check if the target is enabled and the condition is met
doesn't have to be done manually.

Change-Id: If490a84fd5f1ede2d032c3800f69ede4f755bc2c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-04-21 10:55:16 +00:00
Marcus Tillmanns
f172dbca9c CMake: Fix warning about fPic not being the same
Change-Id: I2a2f85c039471e2ad00551bec925cf37ca261b12
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-27 07:30:02 +00:00
Eike Ziller
66d4e12a58 Build: Remove FindQt5.cmake
No longer needed, since we generally only support building with
Qt 6 nowadays, and the parts that still do support building with
Qt 5 handle that manually.

Change-Id: I72381589ca3ab7bf1af88d9f185cad7f0cdf149c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-23 07:12:44 +00:00
Eike Ziller
55fa109b59 CMake build: Use version-less Qt targets
Since we do not support Qt < 5.15 anymore, and as a first step
for getting rid of our special FindQt5.cmake.

Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-01-05 10:13:16 +00:00
Tim Jenssen
98a40b3690 CMake build: Make errors of execute_process fail the build
Instead of silenty failing and resulting in broken builds/packages.

The property is only available since CMake 3.19, so limit the feature to
that.

Change-Id: I82b06e78540e81a809f7fdfe130648becfc9672e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-28 08:29:42 +00:00
Marcus Tillmanns
66eca4cb4b CMake: Fix WITH_SANITIZE
Adding qtc_enable_sanitize to add_qtc_executable to also instrument applications

Changing qtc_enable_sanitize to use target_compile_options instead of trying
to modify CMAKE_CXX_FLAGS_DEBUG and hoping that nobody else overwrites it,
which previously erased the added flags.

Adds support for MSVC /fsanitize

Change-Id: Ida80cfd7ef7ea91b2d6473fdc047cb7132cdfec6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-09-20 10:17:31 +00:00
Eike Ziller
70fb66f9ee COIN: Add test instructions
For now just run them without failing the precheck on failing tests.
The test results are only visible in the precheck details
on testresults.qt.io

Remove the fixed timeout of 5 seconds, since this depends on the test
setup where the tests are run, and it is not possible to override a
fixed timeout with the --timeout option of ctest.

Change-Id: Ib5f12092b64d0cf87e1213b031e1990973e18669
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-29 12:05:06 +00:00
Eike Ziller
6a296ab68a Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectplugin.cpp

Change-Id: I14030f58303839e706af892dd12a67566e3bed68
2022-05-18 13:35:47 +02:00
Eike Ziller
57a69d9d0b CMake build: Avoid endless loop if plugin does not exist
get_property fails if the target does not exist, and _dep stays at some
old value.

This leads to a) a lot of cmake backtraces with an error message that
doesn't add anything useful, and b) an endless loop in
find_dependent_plugins. Which in the end leads to 500.000 lines of
useless CMake output, repeating
"qtcreator/cmake/QtCreatorAPIInternal.cmake:340 (find_dependent_plugins)"

Skip get_property if the target doesn't exist.

Change-Id: Ic694bc05b3dce5b83220a2f5dab8f063ef692c12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-10 12:57:16 +00:00
Cristian Adam
88781a003f CMake: Qt Creator Static build support
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.

Fixes some symbol clashes when all plugins are linked into the same
executable.

Support for actually loading static plugins will be added in a separate
commit.

The feature is controlled by QTC_STATIC_BUILD which by default is OFF.

Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-29 07:16:53 +00:00
David Schulz
ca7a18568c CMake: add ccache option
Change-Id: I482b0f3ac372f141e465b72fbcca9d8b5c5b352d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-04-11 12:29:26 +00:00
Eike Ziller
acd7445c6e Do not require CMake 3.18
Amends 46f6c5d005

Simply disable this safe-guard for < 3.18.

Change-Id: I0ae3b7520a913861c8c9f97ec7e01e5c9c00d362
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-03 09:33:05 +00:00
Thiago Macieira
46f6c5d005 CMake: require no undefined symbols
The ELF default is historical legacy. We should always require all
libraries and all plugins to link to their dependencies and not
accidentally forget something (like implementing a virtual function).

Change-Id: I5e00996d7f4b4a10bc98fffd1629f8bfcf0d1c8f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-03-02 20:03:46 +00:00
Thiago Macieira
652639327f CMake: install the cmake files inside CMAKE_INSTALL_LIBDIR
Change-Id: I54f205f6b7314351b078fffd16d0bab2ccd81cd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-10 16:17:02 +00:00
Eike Ziller
1221552377 Require CMake 3.16 and remove workarounds
CMake 3.16 is available on the major Linux distributions nowadays,
so we can get rid of some workarounds.

Change-Id: I32500375748f33c3e40fbd7a08824d823f817a8f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-02 08:55:31 +00:00
Cristian Adam
7a0bdccadf CMake: Remove debug list source files comparison
This was needed in the early days of the CMake port when the list of
source files would change due to being added to the qmake project
files.

Change-Id: I7afd219b24ab7a0d87fce26ba35dac75cf8caa5b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-29 10:34:18 +00:00
Joerg Kreuzberger
efdaeaba43 Add option to build QtCreator with sanitizer
Fixes: QTCREATORBUG-26318
Change-Id: I44589b5bb39958eda2329b444e4857e8f61823bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-05 09:03:41 +00:00
Cristian Adam
3f0a54d41c CMake: Add option to link with Qt
The named option is BUILD_LINK_WITH_QT, which when set to ON will
generate the QtCreator.ini file needed for Qt Creator to find the
installed Qt.

Change-Id: If3a47a463510fbfc90a314829378c6c4e505d2f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-15 14:26:27 +00:00
Cristian Adam
4c07f10d33 CMake: Fix compilation build with older CMake versions
Change-Id: I86dbff49cf5d00bf75d2e32154db2d3d254e2b17
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-29 11:17:49 +00:00
Eike Ziller
6bc9cddb9e Merge remote-tracking branch 'origin/4.15' into 5.0
Conflicts:
	src/plugins/cmakeprojectmanager/projecttreehelper.cpp
	src/plugins/coreplugin/mainwindow.cpp

Change-Id: Ie3a281b8635e79ca5fa794a127ed0039f33fe2ee
2021-06-24 10:43:10 +02:00
Eike Ziller
4290c26414 CMake build: Force optimization of CPlusPlus lib
Even in the debug build, as done for the qmake build system. This is for
performance optimization of this critical part for C++ parsing even in
debug / developer builds.

Change-Id: I9552ba9fc44e213f2df1d2d2a64a126af3603fd1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 10:10:14 +00:00