CMake supports the use of custom startup programs that are provided
in the IDE to simplify execution.
If the build system provides launchers, these are provided as an
additional selection field of the run configuration including an
entry without launcher.
As of cmake version 3.29, the start programs are extracted from
the API of the cmake file. For older cmake versions, a launcher
is initialized from the cmake variable CMAKE_CROSSCOMPILING_EMULATOR,
if available.
Fixes: QTCREATORBUG-29880
Change-Id: I4345b56c9ca5befb5876a361e7da4675590399ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
That's what the implementation does, and judging from the using code
wasn't quite clear.
Change-Id: I4ca776ba4da83a36162adad2dd595eb39eb0f43d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Qt Creator will use the CMake macro expander for the "vendor" string
entries.
This would allow the following CMake preset snippet to work as a CMake
preset user would expect it to:
```
"vendor": {
"qt.io/QtCreator/1.0": {
"debugger": {
"DisplayName": "LLDB Dap 18.1.7 Debugger",
"Abis": ["arm-darwin-generic-mach_o-64bit"],
"Binary": "$env{HOME}/llvm/clang/bin/lldb-dap",
"EngineType": 1024,
"Version": "18.1.7"
}
}
}
```
Change-Id: I4ea5ce0b004ff05cebbe3e0ce4b6bcc09c716322
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This reverts commit 831b93905b.
Reason for revert: breaks Android and it looks like magic. For CMake one
should use a toolchain file. But this revert keeps the CMAKE_C|
XX_FLAGS_INIT parameters update / merging.
Change-Id: I1c3c61e4a9345a29e72db7f5f5a2d6e3fdba52f1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Let each aspect have a macro expander, and let aspect-owned lineedits
use this for expansion.
Change-Id: Ifa6f5a678cf81c169643e4145f41e69eafedeb93
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This way you can have code completion for the constant literals and not
do any accidental typos.
Change-Id: I1f9dc36327052fcda9575dddec909db93c4b225c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If a CMake preset has the CMAKE_CXX_FLAGS_INIT parameter defined, it
would override the QML debugging flag set before.
This patchset makes sure that both are present.
Change-Id: I2012567af04c2fa0b0097331c05d96770dd86503
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Amends a25bbf23c6
The commit broke evironment variable usage in CMake presets. For example
"$env{HOME}" would have been expanded to "/home/user:/home/user" because
of code thinking it deals with paths.
Change-Id: I3ef34179e2ebaf55b25a42dcce87438c1a72b73e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If a GCC compiler has platform codegen flags they will be set into
CMAKE_C_FLAGS_INIT or CMAKE_CXX_FLAGS_INIT initial CMake parameters.
The linker flags are set they will be set into
CMAKE_EXE_LINKER_FLAGS_INIT, CMAKE_MODULE_LINKER_FLAGS_INIT and
CMAKE_SHARED_LINKER_FLAGS_INIT initial CMake parameters.
If the kit has a Qt the CMAKE_CXX_FLAGS_INIT value will merge both GCC
C++ platform codegen flags and the QML Debugging flags.
Fixes: QTCREATORBUG-24420
Change-Id: I066d30b816ae8575f615654bb85bd82a394f9737
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
CMake can have custom build types. Qt Creator can rename existing build
types.
This changeset allows having a custom build type like for example:
* CMAKE_BUILD_TYPE=MyRelease
* CMAKE_CONFIGURATION_TYPES=MyDebug;MyRelease
Fixes: QTCREATORBUG-30014
Change-Id: I3d81d9ff867bfaab29aaf1741606f9c586da82e0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Amends 5d159e6185
This commit reverts to Qt Creator 12 behavior, plus skipping .obj/.o
parts which are needed for linking but not for finding out library paths
that need to be added to PATH environment.
Tested with https://code.qt.io/cgit/qt/qtdeclarative.git/tree/examples/
qml/tutorials/extending-qml/chapter6-plugins
Without the patch (Qt Creator 12 behavior):
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts/CMakeFiles/chartsplugin_resources_1.dir/.qt/rcc",
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts/CMakeFiles/chartsplugin_init.dir/chartsplugin_init_autogen",
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts/CMakeFiles/chartsplugin_init.dir",
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts",
"C:/Qt/6.7.1/mingw_64/lib",
"C:/Qt/6.7.1/mingw_64/bin"
With the patch:
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts",
"C:/Qt/6.7.1/mingw_64/lib",
"C:/Qt/6.7.1/mingw_64/bin"
As you can see above, only skipping the .obj/.o files will bring a lot.
The change also doesn't come with the side effects of the Qt Creator
13.0.0/1 releases.
Task-number: QTCREATORBUG-29662
Change-Id: I264a0ef579177b7129471919b77cd22a46e7d511
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
At QTCREATORBUG-29662 we have the issue when a program cannot be started
because the PATH environment variable had content longer than 2048
characters.
Qt Creator 12 had only one place that added paths to librarySeachPaths
namely the "bin" directories.
Qt Creator 13 tried to filter these "bin" directories to the ones that
have .dll files. This fixed QTCREATORBUG-29662 but had issues with dlls
having different names than the link libraries provided by CMake.
By only allowing "bin" directories from paths not from the build
directory we allow Qt, or OpenSSL dependencies, but not just existing
"bin" directories.
Amends 0d8a542b4f
Amends 8713919f31
Amends ac97ab1abf
Amends 2ce6255a7d
Task-number: QTCREATORBUG-29662
Change-Id: If0b162f25ae1e5bfc1e1ff313720c54c5ae936c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In order to fix QTCREATORBUG-29662 the check of existence of an dll was
a prerequisite to add the path to the PATH environment variable.
As it turns out this is not an easy thing to do, since the ".lib" file
name can be different than the ".dll" file name.
Also for MinGW you can have ".dll.a" or ".a" as library filename
extensions. You can also have a "lib" as prefix for the library
filename.
Amends 0d8a542b4f
Amends 8713919f31
Amends ac97ab1abf
Task-number: QTCREATORBUG-29662
Fixes: QTCREATORBUG-30827
Fixes: QTCREATORBUG-30932
Change-Id: I90afad825d43fd4f801c2aac20ed98f013861152
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... for task details.
As a result, clicking on a linkified file path inside a task in the issues
pane will now open the editor at the column specified in the compiler
output, if there is one. We used to consider only the line.
Change-Id: Idccba33b5b33029abfa8f29c7888af6c7f2e1622
Reviewed-by: hjk <hjk@qt.io>
Edited the short descriptions to answer the question
"What can I do with this extension" to help users decide
whether they need it.
In long descriptions, tell users what else they need to
be able to use the plugin.
Change-Id: Iefce7505b61fc77cf38cc915f1f7dbd25c9cb570
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This adds "Debugger" as a dependency for the CMake Project Manager.
The "vendor" field of a configurePreset can look like:
```
"vendor": {
"qt.io/QtCreator/1.0": {
"debugger": "C:/Qt/Tools/mingw1120_64/bin/gdb.exe"
}
}
}
```
or with all the DebugItem details as:
```
"vendor": {
"qt.io/QtCreator/1.0": {
"debugger": {
"DisplayName": "GNU gdb 11.2.0 for MinGW 11.2.0 64-bit",
"Abis": ["x86-windows-msys-pe-64bit"],
"Binary": "C:/Qt/Tools/mingw1120_64/bin/gdb.exe",
"EngineType": 1,
"Version": "11.2.0"
}
}
}
```
Fixes: QTCREATORBUG-30836
Change-Id: Ia89ff29ce5fad713ee8617477ec798bd86f2f811
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The CMake parameter is CMAKE_PROJECT_INCLUDE_BEFORE used in the "Initial
Configuration".
This commit will add or remove the above parameter in the "Initial
Configuration" list.
Previously, the parameter would have been added only on the first time.
Now with project CMake settings this is needed also for already
configured projects.
Change-Id: I7293032ef3e7e6e0ad0b51c68ef5fbe0cab48919
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Avoid the redirect that is inevitable nowerdays.
Also, change necessitas.kde.org to www.qt.io, since the orgininal page
is offline.
Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is useful if projects do not to have "Auto Run" CMake or want to
have Junctions enabled.
Change-Id: I4a636e7bf64fe2d29d15d39fe9aa46807684c716
Reviewed-by: hjk <hjk@qt.io>
This puts the implementation introduced in acf1ecb47f into use, after
significant simplifications in the class hierarchy. CRTP is not used
anymore, and the new tag based dispatch is also used for Layout::addItem,
effectively reducing the number of different code paths.
The Lua based settings access is disabled for now.
Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The setting is global for a few Qt Creator versions now, and it was
marked for removal in Qt Creator 13.
Change-Id: Ibca753b53a27ce89cba25a8c55c080e5597c4f57
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Qt Creator opens by default the offline documentation of CMake.
But the user can click on the "Globe" to go to the online version
of the documentation.
Change-Id: I0b3a6bceb13784b232b539f1c04bd09aa3a11034
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use the global synchronizer from Utils::futureSynchronizer() directly
Change-Id: Ic8843bc1ff7951c041529a258f36117f08ec4b35
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Translatable strings should not start with a space, but always adding a
fixed string to an existing string is not a good thing to do in any case.
Languages/translators might have different opinions on this. There is no
good way to do this without breaking the original string, so just do it.
Amends 0e30918955
Change-Id: I4f240d1e0e45f12ee3a7e88dd11a0b539557ab4e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The code that handled the MinGW case of libFoo.a -> libFoo.dll
broke the case of libFoo.dll.a -> libFoo.dll that is handled
by the code before that.
Amends 0d8a542b4f
Amends 8713919f31
Fixes: QTCREATORBUG-30556
Change-Id: I76f60c5e646bce97169b205860babf6a0d3b08b6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Also uses new Utils::ansiColoredText() function.
Change-Id: I43e59f78eb47903fc273244a9cd4e9da9b68839f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This way one could really get a clean build as one would expect when
issuing "Clear CMake Configuration".
Change-Id: I7067bc4f6f858aeb408612eab5e658e637c0c957
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The code was not taking into consideration an empty QStringList.
Fixes: QTCREATORBUG-30755
Change-Id: Ifb9f5dc3ffefd94d44b16b161bc04d381f3f6786
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This presets better results, and is in sync to what other locator filters
are doing.
Fixes: QTCREATORBUG-30452
Change-Id: Ia77d2a5f22b33b55aa081d09372ab5cf297bb065
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>