Commit Graph

46 Commits

Author SHA1 Message Date
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Tobias Hunger
4f40d7778d CMake: Introduce project importer for cmake projects
Change-Id: Ie215e1c3f0286f6d98d10865e2b0a16b01391cd5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-10 10:34:07 +00:00
Filippo Cucchetto
4b1f8f3609 ProjectExplorer: Added support for registering custom languages
Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-23 11:19:11 +00:00
Eike Ziller
b1f1ccb32e Merge remote-tracking branch 'origin/4.2'
Conflicts:
	src/plugins/android/androidbuildapkstep.cpp
	src/plugins/genericprojectmanager/genericproject.cpp

Change-Id: I3484b668f9323ed0c05de99f8dfed07c9e65ab98
2017-01-11 09:29:37 +01:00
Konstantin Podsvirov
ec6587ceb6 CMake: Allow CodeBlocks for NMake Makefiles JOM
Change-Id: I280deb2131959cc538c4af4b7e9b9e07b4f41b80
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2017-01-04 10:09:57 +00:00
Tobias Hunger
5698736284 CMake: CMakeConfigurationKitInformation::setup fix
CMakeConfigurationKitInformation::setup did override the existing value
when it was called. That is not intended, the setup method should only
set a value if none exists.

Change-Id: I86d386982311020dc3dbb3a705e1ff87ad02e09c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-21 14:24:28 +00:00
Eike Ziller
8f0ddff1cc Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/shared/qbs

Change-Id: I5050baa31f4a892d00cd6f7e088d1b597921474d
2016-12-05 10:55:35 +01:00
Tobias Hunger
cae9f70d75 CMake: Do not forget cmake generator information on load
Task-number: QTCREATORBUG-17311
Change-Id: I3439933e396f74a092c9b46aaced0a73c33c4407
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 15:33:32 +00:00
Tobias Hunger
c49a0dd502 CMake: Fix generator warning for server-mode cmake tools
Do not warn on wrong extra generators if cmake supports server-mode.

Make the massage point out the missing server-mode while at it.

Change-Id: I643c77fbebe4ba9a7ea6fee28422283118d145dd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-15 16:33:35 +00:00
Orgad Shaneh
9c09ca9e42 Merge remote-tracking branch 'origin/4.2'
Change-Id: Ia98031eb87f1859c3736faa0cdd8b655e8a50689
2016-11-14 11:17:13 +02:00
Tobias Hunger
156282a97f CMake: Use QT_INSTALL_PREFIX for CMAKE_PREFIX_PATH
QQT_INSTALL_LIBS does not work as intended. That was not obvious since
Qt Creatod adapts the PATH, which had a similar effect, but breaks when
trying to build the project outside Qt Creator.

Change-Id: I36c7caf69a157ae0d4e3dc500265042fd5964681
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-08 12:08:36 +00:00
Orgad Shaneh
410211e090 Merge remote-tracking branch 'origin/4.2'
Change-Id: Ibb932efece05a5f5613823fbc79c5b7601c73905
2016-11-02 16:52:58 +02:00
Leena Miettinen
447a4a45b8 CMake: Fix UI text capitalization
"Generator" is written in lower case in the existing strings.

Change-Id: Ibef67f3f8c4a0aa5a0fa04f68e6b10fb2251d3ef
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 14:28:13 +00:00
Tobias Hunger
d3d5bc5900 CMake: Do not reset generator information
Do not reset generator information when the generator kit information
is already up to date.

Change-Id: I6bd9b94e8b83af2a58cc11ffcbfa11982374644a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-12 09:58:44 +00:00
Tobias Hunger
01903c8c72 CMake: Switch generator/extraGenerator
Swapped that around in the last commit:-/

Change-Id: I2d31af86aecd8e9e6469c9fd573f4dea809fca2a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 12:34:23 +00:00
Tobias Hunger
0b1f6d83c3 CMake: Fix possible crash
Change-Id: Id33b51b8ea2d84a51f328adfed052322634c297e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-09-30 10:33:01 +00:00
hjk
e9fab5896f CMakeProjectManager: Compile fix for gcc 5.4
Change-Id: I8afc2cb29088ff9296959d870473c09a749d78d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 09:31:06 +00:00
Tobias Hunger
ea0643c3ab CMake: Hint at Qt version to be used
Set variables to hint at the Qt version being used.
QT_QMAKE_EXECUTABLE is used to point to qmake (only relevant for Qt4),
and CMAKE_PREFIX_PATH is set to point to the QT_INSTALL_LIBS directory
which should hold a cmake folder with all the information on the
Qt5 version being used.

Update the warnings on the kit based on whether a Qt4 or a Qt5 is used
in the kit.

Change-Id: I77f95febd4c42c15568ebaf3f82bf82464058f61
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Gunnar Roth <gunnar.roth@gmx.net>
2016-09-30 07:28:07 +00:00
Tobias Hunger
de664161a2 CMake: Warn on kits using unsupported cmake versions
Change-Id: I6a3a940280baab78e9f56352008452f694534e76
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 07:27:58 +00:00
Tobias Hunger
b3b6cfb5ef CMake: Improve generator selection in kits
Allow to select generator and extragenerator in a nicer way.
Enable support for platforms and toolsets.

Change-Id: I0c9aae635cdca0ec1db7f285e9cb2785172ed338
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 07:27:14 +00:00
Tobias Hunger
e21df69354 CMake: Handle more information on the generator being used in a kit
Change-Id: I5834fdfa04b91beb7a61fa897209391c7fcf7d74
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-30 07:26:06 +00:00
Leena Miettinen
3a9f242afe CMake: Fix grammar in warnings
Change-Id: Iaadab95ffa102c02fe8de70b11dd1dd5ad224520
Reviewed-by: Aaron Barany <akb825@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-07-26 06:50:55 +00:00
Aaron Barany
80b229a7ab CMakeKitInformation: Separate C and C++ compilers
Task-number: QTCREATORBUG-16501
Change-Id: I25a40afc39ad80deae6d1708816a2a9e527e9ece
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-18 13:18:52 +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
hjk
04a93c3bb5 CMake: Demote non-matching generator to 'Warning'
Default KitChooser behavior is to suppress kits with errors everywhere
but non-matching CMake generator settings are irrelevant for both non-CMake
using projects and analyzer/debugger tools.

Change-Id: Ie60f0f23b5c2423128304227fc573526b7ec2113
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-06 10:53:40 +00:00
Robert Loehning
8372d2199f CMake: Fix typo
Change-Id: I8c0e8acc74b5c87375c9f54a6a889ca0031f6e13
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-04-22 08:42:23 +00:00
Tobias Hunger
73123779aa CMake: Do not warn if there is no cmake but a generator is selected
Task-number: QTCREATORBUG-16103
Change-Id: I4fcefd8ab68b6e34ca92e0d0c6fc1a8e6ec6b70c
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-20 10:52:55 +00:00
Tobias Hunger
12708d9b25 CMake: Make sure null-configuration items do not end up in output
Make sure there are no empty strings returned by null configuration
items visible in the output.

Change-Id: I467f33f41b8eeb25b6cb2b1aa3ada4dd7e1d5950
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-19 11:05:49 +00:00
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
Tobias Hunger
58c326cb73 CMake: Add a reset button to the CMake Configuration edit in Kits
Add a reset button to the CMake configuration edit dialog that is
available in the kits configuration panel. It restores the default
value for the kit.

Change-Id: I89921e2c86cbf8d9658a32fe5fa51dc2f903ff00
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-04-08 10:10:56 +00:00
Oswald Buddenhagen
3c2f0096ea Merge remote-tracking branch 'origin/4.0' 2016-03-22 15:23:12 +01:00
Christian Stenger
47f5c13573 CMake: Fix compile for gcc 4.7.3
Change-Id: I2f07dc1d47d68786a9d62ab980e5f1e719726132
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-21 08:00:33 +00:00
Tobias Hunger
79c710463e CMakeKitInformation: Expose cmake path to MacroExpander
Task-number: QTCREATORBUG-15367
Change-Id: Ia685b738c242b77eef2a96932dee1f7ebfe1787e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-18 14:23:10 +00:00
Tobias Hunger
5e623ddfd1 CMake: Improve handling of cmake configuration in kits
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>
2016-03-16 15:37:48 +00:00
Tobias Hunger
3cffacdd0f CMake: Improve default generator setup on Windows
If ninja is not an option on windows: Pick mingw makefile generator
for kits with a Mingw toolchain on windows and the nmake makefile
generator for other toolchains on windows.

On Unix fall back to the Unix makefiles generator if ninja is
unavailable as we did before.

Change-Id: I8005615e6f725d38c16c1b9026d3f7548e7b42db
Task-number: QTCREATORBUG-15756
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-03 09:53:08 +00:00
Tobias Hunger
869c46227d CMake: Only use ninja if that is found in PATH
Only use ninja by default if that is found in PATH. Still prefer ninja
if it is available as that apparently is a huge time saver, especially
on windows.

Change-Id: Iadaecbaddfe6592222f2ed5e42b440665e9246a7
Task-number: QTCREATORBUG-15756
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-01 10:12:40 +00:00
Tobias Hunger
18afa34587 CMake: Add CMakeConfigurationKitInformation
Add CMakeConfigurationKitInformation and supporting classes.

This KitInformation can hold CMake settings that are to be applied
for all configurations when this kit is used. It contains e.g.
the Qt version and toolchain configured in the kit by default, but
can be extended to hold more.

The UI will warn if the toolchain or Qt version set up in CMake
does not match up with those used by the Kit, but it will allow
the user to proceed.

Change-Id: I73f06a6535ce14de323130d74af83b9cb2ec0f0f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-12 13:31:10 +00:00
Tobias Hunger
2bcfce96ba CMakeKitInformation: Clean up headers
Change-Id: I903c6529d0df83aaef9f109cdc2650cb76392bd5
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-12 11:42:36 +00:00
Tobias Hunger
a764bb49d8 CMake: Add CMakeGeneratorKitInformation
Change-Id: I877c248c7b93268281fc68e814e479d24b844d5f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-12 11:02:16 +00:00
Tobias Hunger
999a8d0516 CMake: Polish CMakeKitInformation
Change-Id: Ifc22c5ad41449ce6597b604746f25cab86662425
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-05 11:47:37 +00:00
Tobias Hunger
5404f9c480 CMake: Remove static defaultValue method from CMakeKitInformation
There is no need to expose this.

Change-Id: I164f1e787b742d330282125320b54a5b2ecb6134
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-05 11:47:23 +00:00
Tobias Hunger
eafb667066 KitInformation: Make defaultValue take a const Kit *
There is no reason not to.

Change-Id: I4accb0b690173d93ad6f4c9dd0bce66d8de75faa
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-05 11:35:20 +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
Orgad Shaneh
866310d56f CMake: Initialize kit priority
Detected by memcheck

Change-Id: I27bb03ce4b4b63ae596bd3a788b6a95cd0944454
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-08-03 09:35:31 +00:00
Eike Ziller
c9af21f9de Kits: Not having a CMake executable set is perfectly valid.
It is the normal situation on Windows & OS X for simple Qt development.

Change-Id: I84453ebcc62200bd6c7223a593b5953c20194069
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-24 11:16:15 +00:00
Benjamin Zeller
1e2d266541 Make CMakeTool known to the Kits
This patch adds support for binding a specific CMakeTool to a Kit.
When creating a new Kit or loading a existing one without a valid
CMakeTool, the default CMakeTool will be set.

Change-Id: I28d0843a01c583c4b31fc680a0ec556b40cd9c0d
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-03 12:47:36 +00:00