sccache does not support the "/Zi /FS" option for debug information
with MSVC. Optionally replace "/Zi" by "/Z7", which leaves debug
information in the object files and only collects it at link time.
See also qtbase 2354274f39934b94383923834479901106489def.
Change-Id: Id94c2116f3c4192556dbdf8fe82b12ce0a204273
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
On Linux (and Windows) we should not create toplevel files (README.md
etc) or directories (doc/, scripts/ etc).
On macOS, move the whole Devel package contents into the app bundle,
because that is installed toplevel in the Qt installers, and we
shouldn't even create include/, lib/ or any other directory at the
toplevel at all.
Since the prefix path must now point to the Resources folder inside the
app bundle, adapt build_plugin.py to also accept --qtc-path pointing to
the app bundle (Qt Creator.app) itself, and also to the app bundles
parent directory. Adapt the Qt Creator plugin project template
similarly.
Task-number: QTCREATORBUG-25414
Fixes: QTCREATORBUG-25415
Change-Id: Ic756237fb920b54b1ec95d076649ad947b39a7e8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Add the pch files that qmake uses.
On Windows, the .lib files must have the major version too,
like the DLLs.
Change-Id: I437bbeac0323c5b9bc174ddea8c0d9be6497b4e6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Tracing library does not build with Qt 6. Disable that automatically
and also the plugins that depend on it. Add some feature info for
the Tracing library, though we usually do not add feature information
for libraries in general.
Change-Id: I51b6993e30ec69d63a031c7bf404ea3887e14d84
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This adds at least partial, transitional support for building
3rdparty plugins with qmake against Qt Creator built with CMake.
This might still miss some other .pri files that follow
their own naming conventions.
Fixes: QTCREATORBUG-24055
Fixes: QTCREATORBUG-25334
Change-Id: I83cc547da938976c2ec12a21a17f286b937147f7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
In the CMake build in general, but still use it for
RelWithDebInfo builds with the build*.py scripts.
Fixes: QTCREATORBUG-25151
Change-Id: I8414f953278ebb395f73414c12af0ed7bd4fcdbe
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Test dependencies are not "real" code dependencies, they just
declare that for testing the plugin the other plugin has to
be loaded, even though it is _not_ a code dependency.
Add PLUGIN_TEST_DEPENDS to add_qtc_plugin. We cannot assume
that the target exists at that point, so adapt the usual pattern.
Fixes: QTCREATORBUG-25024
Change-Id: I4165ff8df762309e0be0bfe9e8bedef796a3bf17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Use the right variable name, and syntax for iterating the list.
Fix plugin configuration order, so targets are found.
Fix misspelled plugin name.
Also remove unused and wrong "EXPERIMENTAL" option.
Change-Id: I77cc5d12ebdaa8bcd0315dd830a9435c648b2ba3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We don't use it for packaging, nor for github anymore, it duplicates a
whole lot of logic, and that only partially (as an example fixing the
RPATH for clang tools on macOS is missing), and the Clang part only
works with CMake >= 3.14 ("file(READ_SYMLINK"), which was the final
trigger of this patch.
Change-Id: I21ff6b01297009eff15bda36963e729dea4927c8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
In a framework the actual library can be accessed via two different
paths:
- Foo.framework/Foo
- Foo.framework/Versions/A/Foo
It happens that Qt5 exports the first variant for the framework LOCATION
and Qt6 exports the second variant.
We want to cut the whole "Foo.framework" part for the framework's location,
so actually do that.
Amends 98db9774f2
Change-Id: Idad12e92f2bfbdc480256a832320c4dec76a0e5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
When building with RelWithDebInfo. The CMake code is adapted from
corresponding (internal) functions from Qt 6.
Also let the scripts create an additional *-debug.7z with the debug
info.
Task-number: QTCREATORBUG-24916
Change-Id: Ibc3c8c0013718b9c5e868136e5ce01e1e99f84c4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
By setting the CMake list variable "BUILD_PLUGINS=foo;bar" the
Qt Creator CMake API will set "BUILD_PLUGINS_BY_DEFAULT=OFF" and
"BUILD_PLUGIN_FOO=ON" and "BUILD_PLUGIN_BAR=ON"
Change-Id: I766d7451bfb7ccbd23c973f288b06a18ada79dda
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake just copies the whole app bundle directory when installing a
target, but we copy various things there that should not be part of the
installation, like static libraries, executables with SKIP_INSTALL,
Clang resources, and potentially .dSYM bundles.
Fixes: QTCREATORBUG-24021
Change-Id: I98bb466b664d2d6d203f3adc20d8345d9b3ce3cc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Disable the libs and executables if not needed by either the plugins or
by the tests.
So far in the cmake build the ClangRefactoring and ClangPchManager
plugins were disabled by default, but the backend executables were still
built. With this change the executables are not built if the plugins are
not enabled, like it is the case in the qmake build.
To make it possible to build all the tests even though the plugins are
disabled by default, the backend libraries are still built if tests are
enabled.
Change-Id: I3b61479525e1472a55215f1b003fea9facaf9e93
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Previously the library targets were added, but with EXCLUDE_FROM_ALL.
This had the effect that libraries were not compiled if nothing depends
on them, but lead to various issues: It wasn't possible to manually
control compilation, and it lead to the library targets still being
exported, leading to configuration errors when building external
plugins.
Implement the same mechanism with BUILD_LIBRARY_* as with plugins,
giving complete control.
Change-Id: Idea3371d130593c5c2fdceee374021b6923db0c9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The public header "textdocumentlayout.h" includes "State" from
KSyntaxHighlighting, so we need to export that.
Since it doesn't have the ".h" extension, it doesn't get exported
automatically either. Add a generic function for adding such special
public header files.
Fixes: QTCREATORBUG-24413
Change-Id: I841e6d601df7e925f48eedcc2a28d6b43c00350e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The change breaks the dev package:
The imported target "QtCreator::clangrefactoringbackend_lib" references
the file
"/home/qt/work/build/qtc_build/lib/qtcreator/libclangrefactoringbackend_lib.a"
but this file does not exist.
This reverts commit 20a6207459.
Change-Id: I68f3b6948bde611b9e5b841d1fde2b136877cbfc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Adapted from qt6_add_resources. Takes a list of files and compiles these
into a resource file.
Change-Id: I375aa17b76e283b90bc0cbe8b6859520bcac7da3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
By default. Previously only the corresponding plugins were disabled, but
not even building the backends makes more sense.
Change-Id: I36d61869a3050f37da1f480dea89e7539dda599a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
That can be used for external plugins. Just add the option "EXPORT" to
your "add_qtc_plugin(MyPlugin ...." call. Other plugins can then do
"find_package(QtCreatorMyPlugin)" and link against
"QtCreator::MyPlugin".
Supports both using a Devel install or using a build directory of the
plugin that is depended on.
Task-number: QTCREATORBUG-22803
Change-Id: I80724eca8c828d2d5be307d32f3125c4e3bd8b3a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We must use the same name everywhere for the export name, for simplicity
stay with QtCreator, since this is not user-visible anyhow.
Change-Id: I4f51982534662d46401dad1320eec3758eed055b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
You might want to build only a specific list of plugins, libraries,
or executables by opting in, instead of building all of them and opting out.
Change-Id: Ic81da380828779e409ba4192f307aa1b77a89808
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Because the tests were missing the visibility flags, and PCH targets
that didn't have the visibility flags were skipped, tests were build
without PCH.
Change-Id: I56ddc81fadcb9e1004032a7e6096ea2c0a480a19
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Clean the paths before adding them to targets.
This prevents the code completion from showing multiple identical
entries when completing an #include.
It also removes ~2MB from build.ninja.
Task-number: QTCREATORBUG-24514
Change-Id: I19f3df400e65d8dfc4747415a8e14dae05d4b88c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
They take much longer, but are also optional.
Makes it possible to run via e.g. "ctest -V -R tst_debugger_dumpers"
Change-Id: I8bbda6ca36e25cd896b1f3be5d1696a27b8acc53
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The plugin libraries got version 0 and compatibility version 0
and libraries compatibility version 4.0.0,
which is not compatible to plugins built with qmake and the runtime
linker prevents loading.
Use the correct IDE_VERSION and IDE_VERSION_COMPAT.
Change-Id: I9a17627c5d212052df644bbc6711dc8fb8307315
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Also add a extend_qtc_test which checks if the test is known.
Change-Id: Idd3b3a02ac61fce2622cb8681233cfbd96a77bc4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Files with absolute paths still go directly into DESTINATION directory.
Follow-up of a9aa561234
Change-Id: I558616f78b3e49a8b3be4372791281f5ca9138c9
Reviewed-by: Alexis Murzeau <amubtdx@gmail.com>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Uses a timestamp file in the build directory to detect when the input
changes using DEPENDS from add_custom_command.
Total copied files size sum up to more than 260 MB. This was copied at every
incremental build, even if nothing changed.
This leads to faster build, especially when the copied files are not
cached in RAM or when not using a SSD.
Change-Id: I3a0b691b961e1d8591068bacf40ae2467c8637cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>