summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager/builddirparameters.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CMakePM: Add QTC_RUN environment variable for the CMake runCristian Adam2023-02-211-0/+2
| | | | | | | | | This way one can do certain things knowing that CMake is being run in Qt Creator. Change-Id: If3ac8a52f30f9fa73a756212199a25632c757dcd Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* CMakePM: Copy auto package-manager to ${buildDir}/.qtc/ directoryCristian Adam2023-02-081-4/+5
| | | | | | | | | | | | | | | | By copying the ${IDE:ResourcePath}/package-manager to ${buildDir}/.qtc/ the problem with hardcoding paths to old an Qt Creator version can no longer occur. This also fixes the issue with remote projects by reffering to the code residing on the host. With the above issues fixed, enable "Package manager auto setup" by default. Change-Id: Ia49654a3b9059f83886e64d065019b2d55e9299c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | 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>
* CMake: Move to Tr::trhjk2022-09-301-4/+2
| | | | | | Change-Id: I169da93b5184351cb915d4c198fd33318fcfe06f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | 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>
* CMakePM: Add configure environment widgetCristian Adam2022-08-161-1/+1
| | | | | | | | | | | | CMakePresets have the concept of modifying the configure process environment variables. Qt Creator had only one "build environment". Change-Id: I131d54971b4bf7e5f87e680f817f93868d62ab29 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMakePM: remove unused headers, enforce sorting of headersCristian Adam2022-07-111-2/+0
| | | | | | | | Used clangd hints. Change-Id: Iade4de67c1d2e5fdd1a880c5603b31203170ebbe Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CMake: Fix missing path to ninja for ExternalProject_AddEike Ziller2022-06-171-6/+0
| | | | | | | | | | | | | | | | | ExternalProject_Add runs CMake not during the CMake run of the toplevel project, but instead it runs CMake for the external project during the build step. And while ExternalProject passes the CMAKE_COMMAND on to the external project, it does not do so for the CMAKE_MAKE_PROGRAM. Make sure that the make program is also found when configuring the external project during the build step, by adding the path to ninja to the build environment, instead of just the CMake process. Fixes: QTCREATORBUG-27495 Change-Id: I672ec04881387a7411836ab94655176b7a5fb681 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>
* CMake: Drop some unneeded includeshjk2022-06-161-4/+0
| | | | | Change-Id: I212d518e47529ff0cacdd968c1d09a7f0970c8d4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Shift remaining data to buildsystemhjk2022-05-051-4/+4
| | | | | Change-Id: I04518a21ce571399c89608d2e59e746f8e6e0d4a Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Pass BuildSystem instead of BuildConfig to BuildDirParamshjk2022-05-021-2/+5
| | | | | | | | | Less indirections. Change-Id: I33ae36aa32aa8fab7223822fd9ec80c64d6d4651 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMakePM: Refactor "Initial Parameters" as a tab bar itemCristian Adam2022-01-171-5/+8
| | | | | | | | | | | | | Now we have "Initial Configuration" and "Current Configuration" as tab bar buttons. This way the UI can be shared between the two configuration states. Task-number: QTCREATORBUG-26869 Change-Id: I8206032a2a5ac076629865057816edb99706f2ff Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: FilePathify Environment::{ap,pre}pendOrSetPath etchjk2021-11-101-2/+1
| | | | | Change-Id: Idfa5ec247337570936b0236cab9d3a5669792ca0 Reviewed-by: David Schulz <david.schulz@qt.io>
* CMake: Fix remote search of non-standard ninja installationshjk2021-07-211-3/+3
| | | | | Change-Id: I9ec636b126b621bb7a676e55a31845328c9e5ba1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CMake: Code cosmeticshjk2021-03-301-2/+2
| | | | | | | | | | - use newer approach to settings page layout building - no SHOUTING enums - namespaces - proper dialog parent for message Change-Id: I7adfb7487d502b8fd706c4a0c5645f4d2153e39c Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMakePM: Make "Build type" aspect visibleCristian Adam2021-03-191-10/+0
| | | | | | | | | | | | For single configuration projects if you change the build type aspect you will change the CMAKE_BUILD_TYPE variable. When switching the build directory the existing CMAKE_BUILD_TYPE will be set as build type aspect. Fixes: QTCREATORBUG-25451 Change-Id: I13519e95c316c556cc1348fba6121637d2fd4275 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMakeProjectManager: Make backup of CMake configuration before starting CMakeCristian Adam2021-02-181-1/+1
| | | | | | | | | | | | | | | | | | | CMake's fileapi functionality will save the project structure in json files in the .cmake/api/v1/reply directory. When issuing a cmake command with -D variables CMake will update its CMakeCache.txt file even if cmake will fail. This commit will rename .cmake/api/v1/reply as .cmake/api/v1/reply.prev and make a copy of CMakeCache.txt before starting CMake, and if something fails, replace the existing files with the previous values. Also make sure the changed values are not dissappearing when the old .cmake/api/v1/reply gets parsed. Fixes: QTCREATORBUG-24593 Change-Id: I82141786fea7068699e0f761a8978ba1f3203e47 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add signing options to CMake/iOS build configurationEike Ziller2021-02-161-4/+6
| | | | | | | | | | | | | | | Adds the signing settings to iOS configurations. Adds placeholders for signing flags to the initial CMake arguments, and updates the CMake configuration when signing settings change. The new configuration doesn't get automatically applied. Only the "Apply Configuration Changes" button gets enabled and the user has to press that explicitly. This seems to be a more general issue affecting the QML debugging setting too, though. Task-number: QTCREATORBUG-23574 Change-Id: I3e8d45f565347e1ad2ac274a21b1552f1510e8f4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMakeProjectManager: Support for multi-config generatorsCristian Adam2021-01-211-0/+12
| | | | | | | | | | | | | | | | | | | | | 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>
* CMakeProjectManager: Use CMAKE_HOME_DIRECTORY as source directoryCristian Adam2021-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | The CMakeCache.txt file has CMAKE_HOME_DIRECTORY pointing to the project source directory used to configure the project. When importing a cmake build the CMAKE_HOME_DIRECTORY from CMakeCache.txt might not point to the same CMakeLists.txt that was opened as a project. qt-cmake-standalone-test from Qt6 uses a CMake template project which does a add_subdirectory with the test source directory, which will not work if opened standalone. Normally this is a user error though, so ask the user if this was intended, before actually importing the build. Task-number: QTBUG-88776 Change-Id: Ifdd5e1d1cb8a1ef9955d22493eba3a1a55dc689f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Utils/ProjectExplorer: Move re-usabled bits of aspects to Utilshjk2020-09-231-0/+1
| | | | | | | | | | | Classes involved are BaseAspect and some derived classes, LayoutBuilder and VariableChooser. This is mostly mechanical, with various include/using changes to make it compile. Change-Id: I624a457f3555f102e541c4c71e33a9423af32250 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.12' into 4.13Eike Ziller2020-07-061-2/+5
|\ | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/lldbbridge.py Change-Id: Ia444f6424fb35b9a539e157afcee868161535272
| * CMake: Fix handling of setting for Ninja pathEike Ziller2020-06-301-2/+5
| | | | | | | | | | | | | | | | When Ninja is installed via the installer, it writes the full path to the Ninja binary into the settings. Change-Id: I95a19c8c1afbf980c899fb1eeb8656e7e86ad4a2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | CMake: Remove magic configuration from CMakeTobias Hunger2020-06-091-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of magic configuration handling in the CMakeProjectManager. * Use CMakeCache.txt as the sole source of truth, do not keep a shadow copy of configuration in the .user file * Have initial CMake arguments that are easy to edit in batch (Fixes: QTCREATORBUG-18179) used whenever no CMakeCache.txt file is in the build directory. These allow for any thing that can be passed to CMake on the command line. (Fixes: QTCREATORBUG-16296) * Ask when changes to CMake configuration were not applied (Fixes: QTCREATORBUG-18504) * Run cmake with arguments effecting its configuration only when the CMake settings are changed in the UI, run CMake without any special arguments in all other cases. * Get rid of the confusing dialog used to keep settings in sync between what is in CMakeCache.txt and Creator (Fixes: QTCREATORBUG-23218) Change-Id: I26d55be7df733f084f5691ecf7d7b4352f58b8e7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | CMake: Fix includes all over the CMake pluginTobias Hunger2020-04-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix buildEike Ziller2020-04-091-0/+1
| | | | | | | | | | | | | | Amends 13daf11d03086ddb9047426bcab18ae0a24fe170 Change-Id: Id29430cd41d522cd5b4b8b1767b4d29a68c97dd5 Reviewed-by: hjk <hjk@qt.io>
* | CMake: Simplify BuildDirParametersTobias Hunger2020-04-091-5/+10
| | | | | | | | | | | | | | Remove some useless bool, Creator would crash if that was ever set. Change-Id: I148cad6b6139332a6010698f075b584c87dec338 Reviewed-by: hjk <hjk@qt.io>
* | CMake: Remove dead code from BuildDirParametersTobias Hunger2020-04-081-1/+0
| | | | | | | | | | Change-Id: Iae900ad0a3b901d2e83a2ea8eb2895b5627897fc Reviewed-by: hjk <hjk@qt.io>
* | ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChainhjk2020-02-191-2/+2
|/ | | | | | | | | Special accessors to the repeatedly used C and C++ cases to denoise and slim down user code. Plus some code cosmetics nearby. Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.11'Eike Ziller2019-11-211-0/+6
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/autotest/testresultspane.cpp src/plugins/cmakeprojectmanager/cmaketool.cpp Change-Id: Iade695ac9cab8bf3e3a1abd6e2c71f4a19132ac0
| * CMakeProjectManager: Add ability to specify path to ninjaCristian Adam2019-11-201-0/+6
| | | | | | | | | | | | Task-number: QTBUG-79885 Change-Id: If0c5efc534e2fc6f0041b9407e2ae24ed671ac8a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectExplorer: Move BuildSystem owership to BuildConfigurationhjk2019-11-191-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or Target. This patch moves build system from conceptually "one per project" to "one per target (i.e. per project-and-kit)" or "per BuildConfigurations" for targets where the builds differ significantly. Building requires usually items from the kit (Qt version, compiler, ...) so a target-agnostic build is practically almost always wrong. Moving the build system to the target also has the potential to solve issues caused by switching targets while parsing, that used Project::activeTarget() regularly, with potentially different results before and after the switch. This patch might create performance/size regressions when several targets are set up per project as the build system implementation's internal data are duplicated in this case. The idea is to fix that by sharing per-project pieces again in the project implementation once these problems occur. Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CMake: Fix inconsistent copy ctor/operator=Orgad Shaneh2019-05-071-0/+1
| | | | | | | | | Detected by GCC9. Looks like inCMakeCache was left out by mistake in df62701801. Change-Id: I231d0d3e102edb95b657aef42c3f2f2f834514a0 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Rename KitInformation to KitAspectChristian Kandeler2019-02-111-9/+9
| | | | | | | | | | | The name "KitInformation" does not properly convey the fact that it represents a certain *aspect* of a kit. The same goes for "KitConfigWidget", which in addition was inconsistent with "KitInformation". We now use "KitAspect" and "KitAspectWidget". Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97 Reviewed-by: hjk <hjk@qt.io>
* CMake: Do not try to use icecream for cmake configuration runsTobias Hunger2018-09-051-0/+7
| | | | | | Task-number: QTCREATORBUG-21003 Change-Id: I166fdf2e540238d9ddd8694a0a7ad65e238e3331 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Do not crash when deleting cmake toolsTobias Hunger2018-05-281-2/+8
| | | | | | | | Do not crash when the cmake tool that was used to parse the project gets removed. Change-Id: Ieda3ae2025dbcfb1f90d9bd01c5f0ed960756c6a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Fix project parsing notificationTobias Hunger2017-10-061-0/+82
This builds on top of 08677c0b014cc44d944e32d462f502a67c948404 and fixes one more code path to go through a common entry/exit point. Change-Id: I1d00fa9242f247028e5d3b0ef3b5fe1d3f4cb03d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>