Commit Graph

19 Commits

Author SHA1 Message Date
Jarek Kobus
4ae94a9910 CMakeProjectManager: Use QtConcurrent invocation for async run
Change-Id: I03b23a6bd32bfaa435ddddab1a7ab47a5203ff44
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-09 13:12:47 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
hjk
ab4c9b9679 CMake: Move to Tr::tr
Change-Id: I169da93b5184351cb915d4c198fd33318fcfe06f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-30 06:56:21 +00:00
Eike Ziller
04e50438eb Utils: Remove Utils::optional
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.

Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-09-01 06:58:04 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Cristian Adam
27f0dd134f CMakePM: Do not treat generated files as project files
This would trigger an infinite loop.

Fixes: QTCREATORBUG-26207
Fixes: QTCREATORBUG-26204
Fixes: QTCREATORBUG-25346
Fixes: QTCREATORBUG-25995
Fixes: QTCREATORBUG-25183
Fixes: QTCREATORBUG-25512
Change-Id: Iaf081a00dcf318a0ec2708e839e0ab6535e0ef4d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-02 08:04:17 +00:00
Cristian Adam
c1c70d339d CMakePM: Fix build library search path with CMake 3.20+
CMake 3.20 has changed the relative path to dependent libraries
from current binary directory to main binary directory.

See https://gitlab.kitware.com/cmake/cmake/-/issues/22556

Fixes: QTCREATORBUG-26110
Change-Id: I39c1d6b2998ebb079e7017e8d349881752d80354
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-20 13:58:15 +00:00
hjk
d254cf5845 CMake: Use Utils::FilePath in fileapi parser and reader
It still relies on local host execution in some places.

Change-Id: I36adfeb93ea26b285bbf6da2aee7e0fac64a7d94
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-09 12:15:02 +00:00
Eike Ziller
58d03f3f2f CMake: cancel file api parsing
Change-Id: Ie59370fa4329f92dd28bf3e147b2828cbd75330b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-01 12:35:25 +00:00
Cristian Adam
c9053256d3 CMakePM: Better error message when CMake file-api config is missing
Now the available configuration list is displayed, alongside with
the hint that CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES needs
to match / contain the "Build type" field.

In order to test this just clear (or set a random value) in the
"Build type" field and click "Re-configure with initial parameters"
button.

Fixes: QTCREATORBUG-25506
Change-Id: I44558c45c7050d03e72a3a0b9ce2c8d89bd6e4bc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-23 15:27:08 +00:00
Cristian Adam
6cbdae8070 CMakeProjectManager: Support for multi-config generators
CMake has multi-config generators like:

  * Visual Studio
  * Xcode
  * Ninja Multi-Config

The first two have different special targets for "all", "install",
"package", "test" namely: "ALL_BUILD", "INSTALL", "PACKAGE",
"RUN_TESTS".

All of them need to get the build type passed via "--config <build-
type>" and not via "CMAKE_BUILD_TYPE".

The multi-config generators will use only one build directory.

Fixes: QTCREATORBUG-24984
Change-Id: I8aa7ff73ce2af1e163b21a6504d26fcf95530edf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-21 09:31:30 +00:00
Christian Stenger
617a8aee2b CMakePM: Start integrating ctest
Gather some more information of a CMake based project to be
able to provide this later on to the AutoTest plugin.

Task-number: QTCREATORBUG-23332
Change-Id: I2beaf0a6456d57871dcf65832f0a79f37fe5fddc
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-09 11:02:37 +00:00
Tobias Hunger
7c985c14ad CMake: Move notification on outside cmake runs into FileApiReader
Move the detection of outside cmake runs into FileApiReader and
make the FileApiParser non-interactive.

Change-Id: I70afc1df35fcfe90e88822569579154aabbdb1cd
Fixes: QTCREATORBUG-24015
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-15 08:36:50 +00:00
Tobias Hunger
517cb05db0 CMake: Clean up API of FileApiParser
Clean up the API of FileApiParser in preparation of moving
the FileSystemWatcher out of that class and into FileApiReader.

Change-Id: I5618252dd98a39f6a70f56b50fb50327e8b43e84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-15 08:36:37 +00:00
Tobias Hunger
5350288e45 CMake: Fix includes all over the CMake plugin
Keep internals internal, remove some unnecessary includes, add
some that should have been there.

This reduces the number of files that get rebuild when working
on CMake internals from over 1000 to about 200.

This patch also moves some code around that ended up being
in the wrong file.

Change-Id: Icd7366ac760dc85031040720418fbb16336dce9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-20 10:05:24 +00:00
Igor Sidorov
a9e40ad14c Add final specifies to classes
Warning -Wfinal-dtor-non-final-class in clang trunk

Change-Id: I2bf17064bf8898eab10b82b69583a283157766d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-05 09:33:55 +00:00
Tobias Hunger
eab0df22f9 CMake: Make fileapi not race against its own reply file detection
Fix broken logic to prevent CMake fileapi from detecting the change
its own cmake run triggered via file watching.

Remember the last file that was parsed and do not attempt to parse
this again. Remember the file on a per-project basis, too:-)

Change-Id: Ia6e155b65d77994f6e3d2a3677f770a4ba53539d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-25 13:32:21 +00:00
Tobias Hunger
09ae77d0a9 CMake: Update code to decide whether to run cmake in fileapi mode
Change-Id: Iea841bb49876a580abc80cc7ea21a88b153cc224
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-23 11:11:30 +00:00
Tobias Hunger
a95eb53d3b CMake: Add initial fileapireader class
Change-Id: I620cba7cc1c2a5ac56789fa9770dce573c6b19cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-20 12:25:36 +00:00