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 supports this for a while now.
As a side effect this fixes QTCREATORBUG-23738, which was caused by the
radio button hack used to show that only one item could be selected at
a time.
Change-Id: I18cbe6c5ee3872edaf74b9d828bde1ac5bf63563
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
The BuildDirManager was used to switch between different
BuildDirReaders. Now that only the FileApiReader is left, that
infrastructure is no longer needed.
Change-Id: I2d339a3407bb633cff6a8f7502b7b09094f63fef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The build directory going to get set up either in
doInitialize or in fromMap, both using magic hidden in
BuildConfiguration itself.
Change-Id: I1aeb59f56d63f0affd50b45cc937e606af6da7b4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
For this to work, we need to make sure no parsing is triggered before
the project is fully set up. Otherwise it would be QTCREATORBUG-23816
again...
Change-Id: If81f4c6b9c82283abdaa8a635f93ebe0bcaf8159
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Makes the line edit disabled and read-only in that case.
We also need to change the custom context menu from the line edit to the
path chooser itself, because disabled widgets do not show a context
menu, but we still want to see the select & copy, and the special
items for opening explorer or terminal.
Task-number: QTCREATORBUG-23798
Change-Id: Ib653b4eaaedfbe54c614377795ddc52d21ac12c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
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>
Rename some constants to get a bit more consistency into the
naming scheme. I am so tiered of missing a constant due to it
not having _ in the expected places!
Change-Id: Ibb5e82ea4e25ccb559352839b96c8a64394f3085
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Only initialize the CMakeBuildSystem after the
CMakeBuildConfiguration has been fully set up. The "builddirectory"
was still pointing to the source directory, so creater configured
cmake in the source directory, leading to a useless directory being
left in the source tree that does not belong there.
Fixes: QTCREATORBUG-23816
Change-Id: I7c9b6ae1f8d999043e700cd9f2d56418c22f2abf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
I can't spell occurred:-/
Similar typos in 3rd party code (sqlite) has been left in place.
Change-Id: I7cfa9911fc434d42ce3df8e9c7ccb83dc00401e8
Reviewed-by: hjk <hjk@qt.io>
The step list names are computed separately anyway, having an
extra preamble consisting of concatenated build list names on
one line looks unnecessary.
Change-Id: If754c6363042927210dfd09c23f2f494081f8c47
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
There should not be a need to have the linkQmlDebuggingLibrary Q_PROPERTY
anymore. The property is added for the benefit of the DebuggerAspect, which
can just check relevant BuildConfigurationAspect directly.
Change-Id: Ic47ca9e26911e096564fe77bd14bebe959b4f116
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The current implementation does not help the user and is not in sync with isEnabled(),
so it is not helpful to have.
Change-Id: Iddde1ac3da24d50e8a16d2bd4c6aa56eef34ef50
Reviewed-by: hjk <hjk@qt.io>
Add a respective aspect to the build configuration
for handling qml debugging from the build side
similar to what we do with qmake and qbs.
Qml debugging needs to get enabled on the build side
before the settings on the run configuration page
has an effect.
Fixes: QTCREATORBUG-23541
Change-Id: I86267747601015760737d8b21978712896892a37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The QObject was not heavily used. Object name was for debugging only,
translation context can be taken from the corresponding BuildConfiguration
objects, the qobject_casts in the three big importers are replaced by
dynamic_cast, which is good enough in that context.
Take the opportunity to re-use translations from base BuildConfiguration
for the common cases and sprinkle in some 'final'.
Change-Id: I8e9727c98c6e943cb333556861c24e701c2bdf45
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Helps to cut down BuildConfigration::setInitializer() usage.
Plan is to have more of that where feasible.
Change-Id: I138fcffc743daaf7068b5236c2a19c9ca0e3e2d4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The information is effectively derivable from kit and build type, so
do it only when needed.
Change-Id: Ideb4e5106a6a0632ade98aad894d5b7aa6f83126
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The base version is good enough nowadays.
Change-Id: I2e2ca690a29f9b877309ca98038d211d5c678fbd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Even if the implementation allowed different lists than 'build'
and 'clean', that's the only set that has been used, ever.
If really needed, this could be re-instated, but for now having
them fixed removes part of the neeed for a two-phase construction
and helps to simplify user code.
Change-Id: I3df09a1829a7d020ef8963d358ea80f8d199ba13
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... 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>
The CMake build types names are translated, which is fine in UI,
but we shouldn't use the translations in the directory name.
Debug/Release/RelMinSize/RelWithDebInfo are known in CMake world,
and don't cause any problems with MSVC when having translations
for Russian / Japanese.
Fixes: QTCREATORBUG-19984
Change-Id: Ia19326f0ca5d277b549f1b82bc569518f7b5c441
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
If the deployment configuration contains an "install into temp dir"
step, then the local file paths of the binaries built by the build tool
will not be in the list of deployable files, because all deployables
come from the temporary install dir. Therefore, look for just a file
name match as a fallback.
Fixes: QTCREATORBUG-21235
Change-Id: Ie3fad515515b4f28cc6bdef1254f4c05a0557569
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Qt 6 will not use qmake to identify a Qt version, so this can not
be part of the public interface of BaseQtVersion anymore.
Provide getters for the information actually read via qmakeProperty(...).
Use the getters whenever possible.
Change-Id: Iadbee80b75e4f8b06caf90e7ed69fae2029b4dd7
Reviewed-by: hjk <hjk@qt.io>
... by a permanent connection, and only evaluate output for the
active build configuration.
Task-number: QTCREATORBUG-21235
Change-Id: I06f87f7ea680f8f25687a0c5ffc936c801ab7de0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Add a class to abstract out the BuildSystem from the Project.
Thie idea is to make a Project have-a BuildSystem, so that
it can stop being one.
The Projects in the different ProjectManagers will get much
simpler that way (and many will only consist of a constructor
with some setter calls) and handles all the interactions
between the rest of Qt Creator and the project.
The complex code to interact with the build systems is then
separate from that.
Change-Id: I3bbb000bb1aed91f0b547ac493f743ede8afb8cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
And the default selected when configuring a project, since it was the
first.
Broke with 5dbfd46bcf which merged
"availableBuilds" and "availableSetups".
Change-Id: Ibc8c241595f3fee6f35e08fa83e499550eff869b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
For now, store most of BuildInfo in the BuildConfiguration. This will
allow accessing it in the BuildStep ctors so the BuildSteps can
be fully setup without polishing afterwards (as currently done
in the main build steps of the three buildsystems, and Nim)
This in meant to be temporary to a large degree.
Change-Id: If6ade6052f4b96670995399ae97ef7d2313f632a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make all buildconfigurations disabled while the project parses.
This unifies how this is handled in different build systems.
Change-Id: I6afca3743ad1433529a4f9d3bfdf73042799e456
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>