This prevents stale tasks from piling up in the issues pane.
Change-Id: I90f79e969b8929e5bb43e3964c01fcd10af2ea33
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
CMake is pretty poor with the data on which files are contained in a project.
Run a filesystem scan of the project directory to find more files.
Change-Id: I9cc3293a9faf9a967efa5f586c144c3e7773588b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Only the original one is implemented so far, but at least
in theory backends for retrieving data from cmake can now
be switched at runtime.
Change-Id: Id73a81c7d40f078be95defd30a38511dca3a3720
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...otherwise all previously selected build configurations begins to
process changes in CMakeLists.txt or other cmake-related files after
save it.
Change-Id: I86ff59022c85d88052ff434480e670ebddd90864
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Add a method to turn a CMakeConfigItem into a string suitable to be passed
to CMake.
Change-Id: Ia7834f1c2fad387dd6e6eaa3863f93385d48ca71
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
No need to pass in the complete kit. Remove a couple of unnecessary
namespace names.
Change-Id: I2ac895535a80b4a54a423ce62dbdede65b67437b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
CMake provides "hack" for cmake-gui, that allows set options variants
and select then from drop down list. Allows Qt Creator re-use this
solution.
See:
- https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
- http://blog.bethcodes.com/cmake-tips-tricks-drop-down-list
Drop down values can be added to option via:
SET_PROPERTY(CACHE OptionName PROPERTY STRINGS Option1 Option2 Option3)
This solution should not restrict to provide any other value, it
provides only suggestion for user to select one of prdefined values.
Change-Id: I8fc52155775f1e04979db8206bb42363df9359e8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Continue to concentrate all the code reading random cmake files in
BuildDirManager. Now the task is to clean up the code, make it less
dependent on values it should not depend on (kits, etc.), make it
handle changes better and finally add another implementation that
uses the cmake server mode to extract the data.
Change-Id: I533625e376b969b64287bc205bd2e4be7a605306
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
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 is in preparation for having support for cmake's server
mode.
Change-Id: I6cc04fe7c5132c491c3f3c0f46560b8ad88808e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Generator is only part of the picture now that the extraGenerator
is separate. Use CMakeGeneratorKitInformation::generatorArguments
instead, that is always the complete thing.
Change-Id: Ifb6238397e70b36e2dc1b145d3dfad1afa2caa3f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The toplevel CMakeLists.txt file should always be visible in the project tree,
otherwise there is no way to fix problems that stop creator from reading the
project structure.
Since the cmake configuration may add that file itself, creator needs to
check before adding that file. All other files are taken straight from
cmake, which makes sure they are unique.
See the minimal project attached to QTCREATORBUG-16671 for an example
triggering this issue.
Change-Id: Iff3e307134b023e6955f47657e998a5981b03da0
Reviewed-by: Eike Ziller <eike.ziller@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>
Testcase: trying to use an existing build dir which was
made for /d/foo where /d is a symlink to $HOME/d.
To help understanding the problem, the error message now prints
both source dirs, the one found in the builddir and the one we expected.
Change-Id: I9a24fbd6ef3cf8108c5edba0d2a5b99ecdea0e89
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Was submitted by mistake for 4.0 (and reverted). Resubmit for master.
Change-Id: Ie3401d009044a46af7fac314d1f29975543a44b0
(cherry picked from commit 0043c721c2)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
I have missed that this change was headed for 4.0 instead
of master. It breaks the build there.
This reverts commit 0043c721c2.
Change-Id: Ia359798c2636b2b4699de9cc73484ec12a757601
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
First make sure the configuration is reset: This makes sure the correct
branch is taken in parse().
Then trigger parsing through the event loop so that its signals will
definitely arrive after persistCMakeState has returned.
Task-number: QTCREATORBUG-16258
Change-Id: I103ca6b6119ec70c99828d883d728a8bb97fd6bf
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Check CMakeCache.txt for changes and ask whether to apply these to the
project going forward.
This will only consider settings that were previously changed by Qt Creator
and will not pick up on newly changed settings.
Change-Id: Ia20c67bc2a5e9965243f08003c10ec684875387f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
waitForFinish returns false if the process is no longer running at
the time of the call. Handle that throughout the codebase.
Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094
Reviewed-by: hjk <hjk@theqtcompany.com>
CMake does change the EXTRA_GENERATOR without having to clear the
configuration. So do not do that anymore.
Change-Id: I09a8ee32e3e2577381fbfb86d55caa75c43c5bf2
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Do clean the cache when necessary. The logic used to be wrong in that
it sometimes would just force a reparse where a cache clean was necessary.
Change-Id: Ice5e3bceaea83d4fd4d7c2ae6e21e76118e2d2c0
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
It makes no sense to not parse if we never parsed before. This got
broken when I tried to reduce the number of cmake runs.
Change-Id: Id70a6550faf248cc983b61f6d2456a93d8454a50
Task-number: QTCREATORBUG-15927
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
On windows we got false negatives due to one path starting with "C:" and
the other with "c:". Use Utils::FileName which should do the right thing.
Change-Id: I7dcf8ad3f61caca7ac7c183d492ebfd57fe1b669
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This fixes the several progress bars from popping up when creating a
cmake project via wizards.
Change-Id: I1d61e74db8a190afd6302cd56f141e08e521a587
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This should stop messages about processes still running when cleaning
up the directory on windows.
This also makes sure the progress bars are closed again.
Change-Id: Ic3e94efc8bdecca35437987e0647284cb48af121
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Use macros. This makes it possible to address the current qt version
and toolchain without having to update those values all the time.
This significantly simplifies changing Qt versions and toolchains in
the kit as well as the code itself.
Change-Id: I35128eebdc96fe6175f565b2e9bdaa40862516a7
Task-number: QTCREATORBUG-15830
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>