Commit Graph

421 Commits

Author SHA1 Message Date
Tobias Hunger
bb8cd10a04 CMake: Rename method
Change-Id: I6d30bdd7cf6d290f33601c766049e48c3def393a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-09-30 10:54:09 +00:00
Florian Apolloner
669d04a686 Massively speed up CMakeProject::buildTree
This is done by updating folders once and not per file.

Task-number: QTCREATORBUG-16930
Change-Id: I6c1959031e7ad774cfd22c7364c88e1d0bd32962
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-23 13:18:42 +00:00
Tobias Hunger
53747b76dd CMake: Do not process UtilityType build targets
Those produce no direct artifacts, so there is no need to check those

Change-Id: Ic10720c1f3c3a7b602c45b870bfd39604754ddee
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-25 11:35:46 +00:00
Tobias Hunger
bda9bf6755 CMake: Do not map all unknown build target types to "ExecutableType"
There is UtilityType now, so use that if there is no executable being
generated.

Change-Id: I9e8d512077b8352ec056b49c8db03644482b8fbc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-25 11:35:37 +00:00
Eike Ziller
b43765b3e8 Merge remote-tracking branch 'origin/4.1'
Change-Id: I5cacf96b5be4053d3a32a7c2a78fad463b9600d0
2016-08-17 15:14:57 +02:00
Tobias Hunger
906e81c745 CMake: Delete watched files when closing a project
Fixes a crash when re-opening a cmake project.

Change-Id: I5fc747f19787594964fe55c19e29e944c4a5092d
Reviewed-by: Benjamin Zeller <benjamin.zeller@canonical.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-17 12:48:03 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
Tobias Hunger
703c410085 CMake: Only start parsing when creator gets focus again
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>
2016-06-28 09:10:02 +00:00
Tobias Hunger
069bb2d359 CMake: Work around cmake reporting include paths in random order
Work around cmake reporting include paths in random order to Qt Creator
due to a bug in the CodeBlocks generator.

Remove the tool chains include paths from the list reported by cmake and
have the code model add those again later. That keeps at least the
include paths of the compiler in order, which is important as this
makes sure any fixed headers shipped with the compiler actually get
picked up.

Task-number: QTCREATORBUG-16432
Change-Id: I218735914bcc750ce87b02b05d111f3fe2bb5644
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-15 08:11:40 +00:00
Eike Ziller
0c5bae640b Merge remote-tracking branch 'origin/4.0'
Change-Id: I80bc3371c6d7cf9f2d46cbcf8e79e4761213d8aa
2016-05-27 12:01:36 +02:00
Tobias Hunger
5bc0d12c6d CMake: Check CMakeCache.txt for changes
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>
2016-05-23 13:18:47 +00:00
hjk
602d899e0f Move CustomExecutableRunConfiguration to ProjectExplorer
There's nothing QtSupport specific in there.

Change-Id: I616a37ed56f1853cdbb16f483de5682d5ea63715
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-13 11:03:06 +00:00
Wolfgang Bremer
2f301bc45b CMake: Update qmljs codemodel
With this patch it is possible to specify QML_IMPORT_PATH in
CMake projects and QtCreator will scan those paths.
One only has to make sure that the variable which is set in the
CMakeLists.txt is also added to the CMakeCache.txt

Task-number: QTCREATORBUG-11328
Change-Id: I11c7694806664d3203d855983e7db4a89fac267d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-04-29 09:08:05 +00:00
Tobias Hunger
83ae0cb934 CMake: Mark cmake as imperfect and disable RunConfigurations as necessary
CMake does not know whether a build target was configured out of the
current build or removed entirely, so implement the relevant marker.

Mark all of the "vanished" RunConfigurations as disabled.

Also remove one unnecessary level of indirection when setting up
RunConfigurations.

Change-Id: I30a21581823b4bff5a5be29480e64423b9379983
Task-number: QTCREATORBUG-15950
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-07 09:57:20 +00:00
Tobias Hunger
44aaec767f CMake: Simplify cmakeproject code a bit
No behavior change is intended in this patch.

Change-Id: I5c49a0a97ede443dbb25bf34b96c346a63f549d2
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-06 08:11:10 +00:00
Tobias Hunger
6ea1b07ceb CMake: Simplify reparsing code
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>
2016-04-01 09:56:27 +00:00
Tobias Hunger
76a050cb83 CMake: Move BuildDirManager from the project into the buildconfiguration
Change-Id: I90126ff22dd394eba4145db142b3914d211af476
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-26 12:17:31 +00:00
Ulf Hermann
2b48a4fa27 QtSupport: Support qscxmlc as extra compiler
Change-Id: Ief4810abe46ce4654f518781ce377e10a8e38ad4
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 12:53:15 +00:00
Ulf Hermann
2e3e060520 Generalize support for extra compilers
Allow for different extra compilers which may get called to generate
additional code for the code model. The build system is expected to
know what files are generated from which source file and the extra
compilers know how to generate the content of those files, without
touching the build directory. the uic adapter is refactored to be
the first such extra compiler.

The extra compiler is run when an editor for its source document
loses focus, or after a timeout of 1s when the source document has
been changed.

Change-Id: I13c110c61120c812f02639a3684144daf8979b37
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 12:53:05 +00:00
Tobias Hunger
181f62c84a Make: Speed up reading compiler flags from build.ninja
Scan through the build.ninja file once for all targets instead once
for each target. This improves CMake project loading speed for
projects with many targets and a large build.ninja considerably.

Change-Id: I857c48a714dbb39a469f81c1f951a77f2f57578e
Reviewed-by: James Legg <jlegg@feralinteractive.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:41:26 +00:00
Niels Weber
68fe98abdf Silence a warning
Change-Id: Ie59da76a14c39208356268e601aef3ba6b5d245a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:39:17 +00:00
Tobias Hunger
a8c2abeaa5 CMake: Register files with the locator again
Change-Id: Ib3a42c22bfac18630b968cfd78744c7827ef7fad
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-15 15:58:57 +00:00
Tobias Hunger
0d10ce3834 CMake: Disable BC if there is an error during initial cmake run
* 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>
2016-02-15 11:57:19 +00:00
Tobias Hunger
744008ccf0 CMake: Store CMake project configuration in CMakeBuildConfiguration
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>
2016-02-15 11:57:15 +00:00
Tobias Hunger
28e4306865 CMake: Add UI to display and edit cmake configuration
Change-Id: I95944dcd58dc86023c2757068979f92b8989011b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:11 +00:00
Tobias Hunger
761d480453 CMake: Do not ask to rebuild after editing CMakeLists.txt files
This happens automatically now, do not bother the user with that
anymore.

Change-Id: Icc411e74ea5de42037f3718c6b75cc15772a64b9
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:05:12 +00:00
Tobias Hunger
859bf2c5ce CMake: Do not run a cmake wizard all the time
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>
2016-02-15 11:04:45 +00:00
Tobias Hunger
fe944e47e7 CMake: Simplify code a little
Change-Id: Ifdfac9bb844c9ab201378a6047714ab64ccebd66
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-22 12:34:42 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Marco Bubke
ddd1d4c9cc CppTools: Remove cpptools/cppprojects.[h|cpp]
Change-Id: Ida0e8552d371972c141cf561b28667f4428c6fff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-13 14:47:27 +00:00
Tobias Hunger
d144ea58e0 Project: Add setRootProjectNode method
Add setRootProjectNode method and a default implementation of
rootProjectNode to Project. Use that in all derived classes.

Change-Id: Id28cde04457a20a8963d43020785ef9d77fea57c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-11 15:33:26 +00:00
Tobias Hunger
219b2d9c16 Project: Do not save filenames in derived classes
Change-Id: I23960c61676e96c429b59ad8f8247e1b88606b1a
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-11 15:33:11 +00:00
Tobias Hunger
21d204ad5c Project: Add setProjectManager method
Implement default projectManager method in Project and use
these two everywhere.

Change-Id: I27e011e6fdc17b36aff1b8b931527307320e347c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-11 15:31:04 +00:00
Tobias Hunger
b386dd0e99 Project: Add setDocument method
Add setDocument method, implement document method, use this in all
projects.

Change-Id: I5018bf7c2739665c13eee340184ce7c41fd319bb
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-11 12:18:11 +00:00
Tobias Hunger
8146402e05 CMake: Use Qt5-style connects
Change-Id: I5ec451b55237fcceca86f0134ae081b435dab5c5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-08 13:33:44 +00:00
Tobias Hunger
1d6c960f05 CMake: Avoid passing CMakeManager around
Change-Id: I96d7f3785767d1d56ca27a2d0af778edf98d63e1
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 12:50:26 +00:00
Tobias Hunger
b2b6d3c526 CMake: Semi-automatic cleanups
* 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>
2016-01-08 12:17:41 +00:00
Tobias Hunger
e26617c3ed CMake: Simplify setup of CMakeOpenProjectWizard
The information is contained in the BuildInfo, so there is no
need to provide it a second time.

Change-Id: I512d148e36996130fab6d8e007dd16d5acebaebb
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 12:17:24 +00:00
Tobias Hunger
a456374088 CMake: Only offer kits with a cmake set up!
Change-Id: Icb4b539e009c9dc5bdf40f8d8b887bb65755b48b
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-08 10:12:08 +00:00
Tobias Hunger
4756fbbfec CMake: Do not bother to remember ninja support status
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>
2016-01-08 10:11:24 +00:00
Tobias Hunger
e4cdad309d CMake: Move MakeStep to CMakeBuildStep
Change-Id: I2a3432acd90cc27fb444ab30c3239497a51e01df
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-08 08:46:58 +00:00
Tobias Hunger
2b69693828 CMake: Store project name in root node
Store project name in root node and remove the member variable
that was used for this purpose from the CMakeProject.

Makes sure the same name is used more consistently.

Change-Id: I2b60a15143934bdeffe6c744fd300be7e81c674e
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-07 10:37:00 +00:00
Tobias Hunger
6a17eafa05 CMake: Use Utils::algorithm
Change-Id: I6d15c9e68c2e9680668509022d8a771e4c7c595a
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-07 10:15:40 +00:00
Tobias Hunger
5d7f5a2a32 ProjectNode: Rename path() to filePath()
Change-Id: I78bb73f8c9457fd74c470eacbf54eb9195ac9681
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-03 11:01:50 +00:00
Daniel Teske
1c38aa287a Simplify logic for showing UnconfiguredTargetPanel/TargetPanel
This doesn't change when the those panes are shown.

Change-Id: Ie5a2d27321e5268f59775892198999a8414a0adb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-18 17:44:33 +00:00
Daniel Teske
014a7b332b CMake: Rewrite logic for kit selection
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>
2015-09-16 10:08:52 +00:00
Eike Ziller
c868b9f3ed Merge remote-tracking branch 'origin/3.5'
Change-Id: Ife5fdcd71b0adc99d4297a28a64515e9e93d7864
2015-09-04 09:19:28 +02:00
Benjamin Zeller
4ffb6649ec CMakeProjectManager: Use factories to create runconfig
At the moment RC factories are ignored when creating
runconfigurations or updating them. This patch changes
the behavior so the RCs are first created/removed and
then updated to match the build targets. This way plugins
can provide custom factories and RCs for cmake projects.

Change-Id: I4a7797e7382784e33ecf016e322eab00e20c07e0
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-09-03 10:38:23 +00:00
Robert Loehning
0a1ad894d5 CMake: Fix project tree displaying "." folders
Task-number: QTCREATORBUG-14994
Change-Id: Iea5a820083b8fc1974a749992f937965285370b6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-01 13:37:21 +00:00
Eike Ziller
3b1a966cc8 Merge remote-tracking branch 'origin/3.5'
Change-Id: Iebaabfc2f724cd493b7cab025406531cea5cd2dc
2015-09-01 12:57:51 +02:00