Make sure to run cmake *before* cmake --build when cmake files just
got saved. This helps e.g. when editing CMakeLists.txt files and the
hitting "Built" and "Save all" (or "Always save before build").
Task-number: QTCREATORBUG-16187
Change-Id: I16b1d02eb342a447003380946ce7a9d785476a0e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This will make it easier to introduce a new type of BuildDirManager
to accommodate cmake server-mode.
Change-Id: I989aab9df44dff1cfdff226ef97bb30bb092ffdd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is in preparation for having support for cmake's server
mode.
Change-Id: I6cc04fe7c5132c491c3f3c0f46560b8ad88808e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If ProjectMacroExpander doesn't resolve it we fall back to the generic
ProjectExplorer resolution, which is likely to pick the wrong project.
Task-number: QTCREATORBUG-16724
Change-Id: I201b722c5fe184905f744a1f344ec46941f92ae3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Rip out QFileSystemWatcher and use Qt Creators IDocument for file
watching instead. The latter properly delays any action till creator
gets focus again.
Task-number: QTCREATORBUG-16354
Change-Id: Ibb71963416b09712a80ee95347425550453b7fd4
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Sometimes cmake changes the type of random settings to INTERNAL.
This change keeps them visible even then.
Change-Id: Icd6bf26b8e2cb031b76bbba8bf0aac70c349fb7b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This keeps user-overrides made via other tools visible in Creator.
Change-Id: Ice07bebb2b82f29ecae83e442bc2090af7f2ee06
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Do not add broken configuration items read in from the .user file.
Change-Id: Ia4372d040456252fdd0750b597777979ad568ca6
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This still fixes the parsing issue when switching build configurations,
but the code is simpler.
Change-Id: I5748788224c5b49399550c33bcef592f193cfa8a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
CMake will silently ignore all but the last target (or fail to build
anything). This allows to simplify our code.
Change-Id: Ieee3931aca0788307107e2021d507073ef42a21f
Task-number: QTCREATORBUG-15928
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Do not run cmake if the kit has changed in ways that
do not effect cmake. Do clean rebuilds for changes to the generator
or cmake tool, etc. which do not work without that.
Change-Id: I4e9d43c5161246c3ded7f784cb0d44c3bd4b04e9
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Those are useful for the cmake internal classes, but need to be filtered
out when they are going to get displayed to the users.
Change-Id: I0bb62fa840fa8cb9e6f3b47300ba85a2b186bad0
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
I just mixed those methods up, so I'd better improve their names:-)
Change-Id: I38a37df4adb0d0402e2c3d9304c79aa414609976
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Make shadowBuildDirectory(...) a static method of CMakeBuildConfiguration.
That way it can be used by a future projectimporter.
Change-Id: I1b3ffc821ac9197aa5c90e2b78891df7a81a31dd
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This avoids creating lots of build directories as the user types
in something into the builddirectory line of the build settings.
Change-Id: Ib08a0f65e08bce104e4baf9e19fb01730d2f5f08
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Disable the BC and give report the cmake error
* Show a warning label in the BC
Change-Id: If5737d033fa2682c264ab7ac1189c59947e3b28d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Store CMakeConfig in CMakeBuildConfiguration instead of the list of
initialArguments.
Update initialArguments to a list of settings on load.
Change-Id: If58fc38296a4627f40062dd407e684c8a9477f6e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Do not push the cmake running straight into the face of the user. Do it
in the background instead.
This needs some follow-up patches to become really useful.
Change-Id: I3457178b33e3f14bdeac25005a773d17abb73b65
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Shorten header guards
* Use override and auto where possible
* Remove useless destructors, etc.
* Remove private slots sections, unify private: sections
* Use member initialization where it makes sense
Change-Id: I00eaf6d706adc16859176d1b68c631d3336bb39f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Do not bother to remember ninja support status now that it is no longer
used.
Change-Id: Ief24af8e39ad5e39633ccb6d31858fa003de5ce8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
We define a Profile build to be a Release build with separate debug
info. You can thus change a given build from Release to Profile of vice
versa by toggling the separate debug info checkbox. The messaging for
future user interaction about Profile builds has to take this into
account.
Task-number: QTCREATORBUG-14009
Change-Id: I62a5b13993b20bf36329b1eefa8b1b6096f31644
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Some time ago the all the wizards for the Plain C++ were coalesced into one wizard.
Since then the wizard asks first for the targets via a targetsetuppage and then
in the CMakeOpenProjectWizard asked for the kit again.
This patch clean thats up, by always using the TargetSetupPage for kit
selection and removing code from the CMakeOpenProjectWizard for kit selection.
It also adds more types of buildconfigurations
Offer: Debug, Release, ReleaseWithDebugInfo, MinSizeRelease with the
corresponding -DCMAKE_BUILD_TYPE parameters. That argument is saved
in the build configuration and used once for the first cmake run. (Subsequent
runs of cmake don't require passing that to cmake again.)
Also do not require running cmake on creating the buildconfiguraiton, instead
postpone that until the buildconfiguration is made active. With the current
cmake wizard, selecting multiple kits would show a dialog per buildconfiguration.
Change-Id: I3bb806113f4f529f8e291830647d2515a6c4df8a
Task-number: QTCREATORBUG-12219
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Export CMakeProject to make it possible for plugins
to inspect the BuildTargets of a cmake project.
Change-Id: Ia7eb94689afefee7789e32ec009579856746787a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Preparing for exporting the CMakeProject symbol. Removing all APIs
from the header file that will continue to be interal API.
Change-Id: I820ea0efb909e6a75be70ccb3b419f841a15cfb3
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
When autocreating the name for a shadowbuild directory
the project directory name should be used instead of
the project file name. Otherwise CMakeLists.txt will be
used instead of the real project name.
Change-Id: If657b1527bfc5345243b8934d25fa4324580bebc
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
In ancient times we needed to support some qt versions that didn't support shadow
building. This code has been unused for some versions now, so remove it completely.
Change-Id: I311f255d6bfed6841e94c9c383bd9929d0d55520
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
All static functions, can live closer to related code.
Change-Id: I54c5680256c78f1d09b4bee3e8843b2f4350b75a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Since we want to treat them differently.
Task-number: QTCREATORBUG-12461
Change-Id: Ia72b8045390ceec693fa416f65010a4c4dbecce1
Reviewed-by: Eike Ziller <eike.ziller@digia.com>