Commit Graph

234 Commits

Author SHA1 Message Date
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 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 9b6a743b80 cmLocalGenerator: Remove Parent pointer. 2015-08-28 18:44:38 +02:00
Brad King 27e4b21dfa Merge topic 'use-generator-target'
c2b7336f cmGeneratorTarget: Move GetConfigCommonSourceFiles from cmTarget.
69329fff cmGeneratorTarget: Move GetLanguages from cmTarget.
0431f2c4 cmGeneratorTarget: Move ComputeLinkImplementationLanguages from cmTarget.
abe9505d cmGeneratorTarget: Move HaveBuildTreeRPath from cmTarget.
d4a24c0e cmGeneratorTarget: Move GetLinkImplementation from cmTarget.
83981cf5 cmTarget: Add GetLinkImplMap method.
771e79a2 cmLinkItem: Add cmOptionalLinkImplementation type.
3846ebcf cmLinkItem: Add cmLinkImplementation type.
a7f5d70d cmGeneratorTarget: Move compile defintions processing from cmTarget.
d051086c cmGeneratorTarget: Move compile features processing from cmTarget.
db4cb92b cmGeneratorTarget: Move compile options processing from cmTarget.
e6ccbf6f cmGeneratorTarget: Move include directory processing from cmTarget.
8bfb0c53 cmGeneratorTarget: Move link iface helpers from cmTarget.
2cb3e574 cmGeneratorTarget: Move GetImportLinkInterface from cmTarget.
6d3d099b cmGeneratorTarget: Move ComputeLinkInterfaceLibraries from cmTarget.
0db9d927 cmGeneratorTarget: Move GetLinkInterfaceLibraries from cmTarget.
...
2015-08-27 10:07:32 -04:00
Brad King 6904b6efdc Merge topic 'rm-cmLocalGenerator-Children'
867b5be8 cmLocalGenerator: Remove unused Children member.
6c832219 cmLocalGenerator: Implement child traversal in terms of cmState.
3fcf3837 Makefiles: Remove valueless cast.
223f4a66 cmLocalGenerator: Simplify condition.
ae026f54 cmState: Store Children states in parent state.
2015-08-27 10:04:07 -04:00
Stephen Kelly 69329fff70 cmGeneratorTarget: Move GetLanguages from cmTarget. 2015-08-26 19:46:32 +02:00
Stephen Kelly 6c832219ea cmLocalGenerator: Implement child traversal in terms of cmState. 2015-08-24 20:05:37 +02:00
Stephen Kelly 3fcf383763 Makefiles: Remove valueless cast. 2015-08-24 20:05:37 +02:00
Stephen Kelly 7fbc56ac40 cmGlobalUnixMakefileGenerator3: Implement progress in terms of cmState. 2015-08-24 20:03:30 +02:00
Stephen Kelly 65c434e1b0 cmGlobalUnixMakefileGenerator3: Inline an IsExcluded call. 2015-08-24 20:03:29 +02:00
Stephen Kelly 3fa1b9641d cmGlobalUnixMakefileGenerator3: Change the progress container key. 2015-08-23 18:05:13 +02:00
Stephen Kelly 04168cbb59 cmGlobalUnixMakefileGenerator3: Rename member. 2015-08-23 18:05:13 +02:00
Stephen Kelly 2394584ce2 cmGlobalGenerator: Rename progress initializer method. 2015-08-23 18:05:13 +02:00
Stephen Kelly b9eb3cd140 cmGlobalGenerator: Move LG to target map to subclass.
This is the only user.
2015-08-23 18:05:01 +02:00
Stephen Kelly dd11f72ced cmGlobalGenerator: Base exclusion computation on cmGeneratorTarget. 2015-08-07 00:32:15 +02:00
Stephen Kelly 8d2de00244 cmGeneratorTarget: Move NeedRelinkBeforeInstall from cmTarget. 2015-08-05 18:20:47 +02:00
Michael Ensslin 1d3984780d Makefile: Optionally disable target completion messages in build output
Add a TARGET_MESSAGES property to control whether Makefile targets print
the "Built target " completion messages.  Default to ON to preserve
existing behavior.
2015-07-14 13:57:58 -04:00
Brad King a4a2518dd4 cmLocalUnixMakefileGenerator3: Provide GetConfigName() accessor
Rename internal member from ConfigurationName to ConfigName to
match the ninja generator.
2015-07-09 09:50:05 -04:00
Brad King 001f9b3617 Add common base classes to Makefile and Ninja generators
Provide a place to move functionality common to both.
2015-07-09 09:50:05 -04:00
Stephen Kelly d4a8a554ea cmGlobalGenerator: Map local generators to generator targets. 2015-07-01 19:46:19 +02:00
Stephen Kelly faec4e611d cmComputeTargetDepends: Change API to use cmGeneratorTarget. 2015-07-01 19:46:19 +02:00
Stephen Kelly 8bfaadfa39 cmMakefile: Move IsRoot API from cmLocalGenerator. 2015-06-21 21:14:05 +02:00
Stephen Kelly 3b880a0741 cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.
Refactor the local generator creation API to accept a
cmState::Snapshot.  Adjust MakeLocalGenerator to use the 'current'
snapshot in cases where there is no parent.  Create the snapshot
for subdirectories in cmMakefile::AddSubdirectory.

This means that snapshots are now created at the point of extending the tree,
as appropriate, and independently of the cmLocalGenerator and cmMakefile they
represent the state for.
2015-05-27 09:18:32 -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
Stephen Kelly 333c1fa83b cmGlobalUnixMakefileGenerator3: Host the UnixCD. 2015-05-18 20:06:16 +02:00
Stephen Kelly a97df5e135 cmGlobalUnixMakefileGenerator3: Host the PassMakeflags. 2015-05-18 20:03:49 +02:00
Stephen Kelly cf7f03e522 cmGlobalUnixMakefileGenerator3: Host the DefineWindowsNULL. 2015-05-16 05:20:36 +02:00
Stephen Kelly e9b134b95d cmGlobalUnixMakefileGenerator3: Host the include directive.
There is no sense in copying this to each cmLocalGenerator.
2015-05-16 05:20:12 +02:00
Stephen Kelly b659d161da cmGlobalGenerator: Add NVI wrapper to create local generator. 2015-05-16 05:18:25 +02:00
Stephen Kelly 115e919982 Use new top-level check abstraction. 2015-05-14 20:47:36 +02:00
Stephen Kelly 34c9ee2ed7 cmLocalGenerator: Require a global generator in the constructor.
Port generator factory methods to pass it.
2015-05-14 20:36:27 +02:00
Stephen Kelly a48aebcb67 cmLocalGenerator: Require a parent in the constructor.
Pass the parent though cmGlobalGenerator::CreateLocalGenerator.

This will make it easy to initialize state scopes independent of
cmMakefile.
2015-04-28 07:50:52 +02:00
Stephen Kelly 32b8f03acc cmMakefile: Port users of GetStart* methods to new names. 2015-04-21 00:15:20 +02:00
Stephen Kelly 54d6a9187f cmMakefile: Rename GetCurrent{Output,Binary}Directory.
Match names used in CMake code.
2015-04-21 00:12:52 +02:00
Stephen Kelly 044dc81504 Use the Home directories from the cmake class where intended. 2015-04-21 00:12:51 +02:00
Stephen Kelly f034bb2f54 Remove redundant calls to MakeStartDirectoriesCurrent.
The SetStart{,Output}Directory methods do what it does.
2015-04-21 00:12:51 +02:00
Stephen Kelly f081c5bddd cmState: Move CacheEntryType enum from cmCacheManager. 2015-04-13 11:44:16 -04:00
Stephen Kelly 7916d7bac6 Include cmAlgorithms where it is used. 2015-03-11 00:17:29 +01:00
Brad King 3e98ebbaef JOM: Pass /NOLOGO when driving builds as is done for NMake
This fixes RunCMake.(Configure|configure_file|try_compile) test
failures that failed to match empty stderr due to jom printing
its identification line.
2015-03-02 10:08:09 -05:00
Gregor Jasny ce935ebe50 cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja
The Ninja build system does not support a in-file verbositiy switch.
Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE
setting and pass it as an optional '-v' argument to Ninja.  This can
serve as a reasonable fallback.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-26 09:51:11 -05:00
Brad King 8521fdf56e Makefile: Fix output during parallel builds (#12991)
Replace use of separate "cmake -E cmake_progress_report" and "cmake -E
cmake_echo_color" commands to report the progress and message portions
of build output lines with --progress-* options to the latter to print
everything with a single command.  The line buffering of the stdout FILE
stream should cause the whole line to be printed with one atomic write.
This will avoid inter-mixing of line-wise messages from different
processes during a parallel build.
2015-02-06 08:36:51 -05:00
Stephen Kelly fd7b371293 Replace foo.size() pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly aa773035b7 Replace !foo.size() pattern with foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly 931e055d8c Port all cmOStringStream to std::ostringstream.
All compilers hosting CMake support the std class.
2015-01-11 17:06:03 +01:00
Brad King 9f92a78be2 cmLocalGenerator: Rename 'MAKEFILE' to 'MAKERULE'
Rename the internal enumeration value for converting paths destined
for use in Makefile rule syntax.
2014-07-22 12:27:57 -04:00
Stephen Kelly e6971df6ab cmTarget: Make the source files depend on the config.
Disallow the use of config-specific source files with
the Visual Studio and Xcode generators. They don't have
any way to represent the condition currently.

Use the same common-config API in cmQtAutoGenerators. While
it accepts config-specific files, it doesn't have to support
multiple configurations yet.

Loop over the configs in cmTargetTraceDependencies
and cmGlobalGenerator::WriteSummary and consume all source
files.

Loop over the configs in cmComputeTargetDepends and compute the
object library dependencies for each config.
2014-04-02 23:14:02 +02:00
Stephen Kelly c3a2f78b5a Makefiles: Remove duplicate code.
The cmGlobalUnixMakefileGenerator3::ProgressMapCompare struct is
logically equivalent to cmStrictTargetComparison.
2014-03-17 15:32:19 +01:00
Stephen Kelly d83ef53a12 Rename local 'dir_max' variables to 'dir'
The code is not computing the maximum length directory, as is the
case in cmLocalVisualStudioGenerator::ComputeLongestObjectDirectory.
2014-03-17 15:27:01 +01:00
Stephen Kelly 6c9dd0ec7b cmGlobalGenerator: Make ComputeTargetObjects non-virtual
Implement it in terms of the ComputeObjectFilenames virtual method
on the local generators.

Remove the reimplementation from the global generators which are
now all functionally identical.
2014-03-15 09:30:24 +01:00