Commit Graph

147 Commits

Author SHA1 Message Date
Brad King 091b649e19 Revert "Automoc: Fix support of files with the same name (#12873)"
This reverts commit 9beb2744d7.
Our AUTOMOC documentation states that it should be possible to
`#include "moc_foo.cpp"` in `foo.cpp`, and this will not work if
the file is placed in a different directory.  Another solution
will need to be found to the original problem.

Reported-by: Stephen Kelly <steveire@gmail.com>
2016-02-19 08:59:17 -05:00
Mariusz Pluciński 9beb2744d7 Automoc: Fix support of files with the same name (#12873) 2016-02-16 10:45:19 -05:00
Stephen Kelly 780bff5279 cmake: Store hardcoded lists of sources and headers
Don't duplicate this in each cmMakefile.
2015-10-27 07:44:22 +01:00
Stephen Kelly 20b95ef8c8 cmState: Initialize default definitions immediately.
Don't leave this as cmMakefile responsibility.
2015-10-14 00:16:20 +02:00
Stephen Kelly 360e4e1db0 Set the current dirs on the snapshot before creating the cmMakefile.
The cmMakefile should get a fully prepared snapshot and not clobber its
definitions.  It should eventually be able to process list files from any
starting-point snapshot, though that is some refactoring away still.
2015-10-07 20:19:41 +02:00
Stephen Kelly 1fe390201d QtAutogen: Port away from cmLocalGenerator. 2015-09-29 09:56:23 -04:00
Stephen Kelly 59a729b2be QtAutogen: Split initializer class into separate file. 2015-09-29 09:56:23 -04:00
Stephen Kelly 1e83a963d8 QtAutogen: Split initializer methods into separate class. 2015-09-26 19:32:54 +02:00
Stephen Kelly c3c20d3ce3 QtAutogen: Add _automoc.cpp sources before initializing. 2015-09-26 19:32:53 +02:00
Stephen Kelly 8b6ec29d40 QtAutogen: Move initialization condition to caller. 2015-09-26 19:32:53 +02:00
Stephen Kelly e791c85419 QtAutogen: Make some methods static. 2015-09-26 19:32:52 +02:00
Stephen Kelly a3ceb998d7 QtAutogen: Don't use members to initialize automoc targets. 2015-09-26 19:32:50 +02:00
Stephen Kelly dced2fe10f QtAutogen: Rename variable. 2015-09-26 19:21:49 +02:00
Stephen Kelly f9a77e76e4 QtAutogen: Don't use a member to store skipped uic files. 2015-09-26 18:48:23 +02:00
Stephen Kelly ff8ac8ee6a cmLocalGenerator: Create from already-constructed cmMakefile.
Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
2015-08-28 18:44:39 +02:00
Stephen Kelly 7fdc9a8b5f QtAutogen: Use a smart pointer. 2015-08-28 18:44:38 +02:00
Stephen Kelly 92041eec49 cmGlobalGenerator: Remove MakeLocalGenerator method.
Inline implementation to callers.
2015-08-28 18:44:38 +02:00
Stephen Kelly acb006229d cmGlobalGenerator: Require a snapshot to create a local generator. 2015-08-28 18:44:38 +02:00
Stephen Kelly c2b7336ff3 cmGeneratorTarget: Move GetConfigCommonSourceFiles from cmTarget. 2015-08-26 19:46:33 +02:00
Stephen Kelly a7f5d70dde cmGeneratorTarget: Move compile defintions processing from cmTarget. 2015-08-26 19:46:30 +02:00
Brad King 6db713c07f Remove use of include <cmsys/ios/*> and cmsys_ios::*
We no longer need this compatibility layer for the compilers we support.
2015-08-20 16:19:08 -04:00
Brad King 9e51147646 Merge topic 'global-generator-makefiles'
6d8a125e cmQtAutoGenerators: Prefer a generator to access global generator.
5f66900e cmGlobalGenerator: Port Find API to cmMakefile.
c5b8841f cmGlobalGenerator: Create global targets from cmMakefiles.
8f75ea3b cmGlobalGenerator: Port global target creation to cmMakefile.
56f0540b cmGlobalGenerator: Port Configure-time check to cmMakefile.
19b546ef cmGlobalGenerator: Base final target property computation on Makefiles.
f8be9ba9 cmGlobalGenerator: Base progress on Makefiles, not LocalGenerators.
bc1097e3 cmExportLibraryDependenciesCommand: Port to cmMakefile.
204aecdf cmGlobalGenerator: Port configure-time code to cmMakefile.
3dd6f0a5 cmake: Port configure-time code to cmMakefile.
73e4df99 cmGlobalGenerator: Store a container of cmMakefiles.
19369937 cmGeneratorTarget: Port internal type to cmGeneratorTarget.
32f131b0 cmGeneratorTarget: Prefer the local generator to access the global.
2015-08-11 08:47:10 -04:00
Stephen Kelly 1f54bc1cf3 cmTarget: Split storage of include directories from genexes. 2015-08-07 17:06:15 +02:00
Stephen Kelly 6d8a125e49 cmQtAutoGenerators: Prefer a generator to access global generator. 2015-08-07 04:10:29 +02:00
Stephen Kelly 5ff813c7a6 cmGeneratorTarget: Move LinkInterfaceDependent methods from cmTarget. 2015-08-05 18:20:45 +02:00
Stephen Kelly 12bc571c13 cmGeneratorTarget: Move GetAutoUicOptions from cmTarget. 2015-08-05 18:20:43 +02:00
Stephen Kelly 610572b7d2 cmMakefile: Simplify generate-time cmGeneratorTarget creation. 2015-07-29 10:43:33 -04:00
Stephen Kelly 5b60eaf619 cmTarget: Restore the ImportedGetLocation method.
It was removed in commit f154475b (cmTarget: Refactor GetLocation
API, 2014-03-08), but it is more readable for targets we know are
imported.
2015-07-27 21:58:50 +02:00
Stephen Kelly 496f4cd07d cmGlobalGenerator: Create cmGeneratorTargets before QtAutomoc.
Add cmGeneratorTargets as needed in the QtAutomoc processing.
2015-07-27 21:58:49 +02:00
Brad King 92b3bd50fe Merge topic 'autorcc-qt-5.1'
9a271e13 cmQtAutoGenerators: Fix rcc invocation for Qt 5.0 and 5.1 (#15644)
2015-07-10 08:51:24 -04:00
Brad King 9a271e1323 cmQtAutoGenerators: Fix rcc invocation for Qt 5.0 and 5.1 (#15644)
In commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files if their
input changes, 2014-09-17) we added use of the rcc "--list" option.
Prior to Qt 5.2 this option was called just "-list", and the older name
is still supported by the newer tools.  Use the older name of the option
for compatibility with Qt 5.0 and 5.1.
2015-07-09 13:02:07 -04:00
Brad King 56e5d4e180 Merge topic 'use-generator-target'
e7714235 Get the local generator from the GeneratorTarget.
5aa556be cmMakefileTargetGenerator: Require cmGeneratorTarget.
bb88668a cmNinjaGenerator: Require cmGeneratorTarget.
a3b210fd cmGeneratorTarget: Require a cmLocalGenerator to construct.
8ec60c67 cmGlobalGenerator: Create GeneratorTargets with a local generator.
dee197fe GHS: Use a cmGeneratorTarget in generator API.
b2b41b83 cmGeneratorTarget: Add accessor for cmLocalGenerator.
2e9333a1 C::B: Get the Makefile from the LocalGenerator, not vice-versa.
2015-06-23 09:08:20 -04:00
Brad King bddfe77d12 Merge topic 'qt-autogen-always-run'
2bf22a4b QtAutogen: Add comment explaining why rcc cannot use PRE_BUILD
0e346427 QtAutogen: Always run autogen step even when rcc is enabled (#15608)
2015-06-23 09:08:15 -04:00
Brad King 2bf22a4b90 QtAutogen: Add comment explaining why rcc cannot use PRE_BUILD 2015-06-23 09:05:30 -04:00
Stephen Kelly e77142350d Get the local generator from the GeneratorTarget.
The Makefile should not know the LocalGenerator at all
2015-06-22 13:23:46 -04:00
Stephen Kelly b3e2e332eb QtAutogen: Get the global generator from the Makefile. 2015-06-21 21:14:08 +02:00
Brad King 0e346427a2 QtAutogen: Always run autogen step even when rcc is enabled (#15608)
In commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files if their input
changes, 2014-09-17) the "cmake -E cmake_autogen" rule was switched from
always running to running as a custom command with dependencies if rcc
is enabled.  This is not correct because automoc always needs to re-run.
Switch back to always running the command.
2015-06-19 10:29:38 -04:00
Brad King 83af11d411 Fix preprocessor checks WIN32 => _WIN32
The latter is predefined by Windows toolchains and is more reliable.

Reported-by: Michael Stürmer <michael.stuermer@schaeffler.com>
2015-06-15 09:58:29 -04:00
Stephen Kelly 59e21ffa13 Port static calls from cmLocalGenerator to cmOutputConverter. 2015-06-06 09:15:58 +02:00
Stephen Kelly a653611db0 cmake: Replace CurrentLocalGenerator concept with CurrentMakefile. 2015-06-04 09:06:41 -04:00
Stephen Kelly c7b79aa16a cmGlobalGenerator: Require a cmake instance in ctor.
It is required anyway, so this makes it explicit.
2015-05-27 09:18:31 -04:00
Brad King 3e3a09d1d3 Merge topic 'clean-up-CMAKE_COMMAND'
6fbd4cae Use cmSystemTools::GetCMakeCommand() to get path to cmake internally
2015-05-21 09:03:52 -04:00
Brad King 6fbd4cae0d Use cmSystemTools::GetCMakeCommand() to get path to cmake internally
This is much simpler than finding a way to lookup "CMAKE_COMMAND"
everywhere.
2015-05-20 11:20:42 -04:00
Stephen Kelly a5b59fae15 QtAutogen: Create global generator on the stack. 2015-05-20 00:30:16 +02:00
Stephen Kelly fe401ede2a QtAutogen: Use a more-obvious delete-target. 2015-05-20 00:30:15 +02:00
Stephen Kelly c95a55ad5a QtAutogen: Remove the need for a local makefile variable. 2015-05-20 00:30:13 +02:00
Stephen Kelly 460e8fb9ad QtAutogen: Inline static factory method. 2015-05-20 00:23:28 +02:00
Stephen Kelly 58f41c789f QtAutogen: Remove repeated setters.
These methods are called already just before calling the static method.
2015-05-20 00:22:51 +02:00
Brad King 56dc91c3ad Merge topic 'clean-up-vs-generators'
dad8b03f VS: Remove obsolete methods.
e435f875 VS: Move version information to global generator.
b5f093f0 VS: Simplify setting of flag table.
2015-05-19 11:09:34 -04:00
Stephen Kelly e435f875ec VS: Move version information to global generator. 2015-05-19 11:02:33 -04:00