Commit Graph

71 Commits

Author SHA1 Message Date
Stephen Kelly a45fed81e5 cmGeneratorTarget: Move GetCompilePDBPath from cmTarget. 2015-08-05 18:20:46 +02:00
Stephen Kelly f0aa660772 cmGeneratorTarget: Move HasSOName from cmTarget. 2015-08-05 18:20:46 +02:00
Stephen Kelly 766839c56d cmGeneratorTarget: Move GetLibraryNames from cmTarget. 2015-08-05 18:20:46 +02:00
Stephen Kelly 47803e6f8e cmGeneratorTarget: Move GetExecutableNames from cmTarget. 2015-08-05 18:20:46 +02:00
Stephen Kelly 7da4c9d4ed cmGeneratorTarget: Move GetLinkImplementationClosure 2015-08-05 18:20:45 +02:00
Stephen Kelly 97f10e488a cmGeneratorTarget: Move ReportPropertyOrigin from cmTarget. 2015-08-05 18:20:45 +02:00
Stephen Kelly 5ff813c7a6 cmGeneratorTarget: Move LinkInterfaceDependent methods from cmTarget. 2015-08-05 18:20:45 +02:00
Stephen Kelly 90bad039c4 cmGeneratorTarget: Move CheckPropertyCompatibility from cmTarget. 2015-08-05 18:20:44 +02:00
Stephen Kelly 803a7982b4 cmGeneratorTarget: Move GetLinkInformation from cmTarget 2015-08-05 18:20:44 +02:00
Stephen Kelly 244c5b5dcd cmGeneratorTarget: Move IsLinkInterfaceDependent* from cmTarget. 2015-08-05 18:20:44 +02:00
Stephen Kelly 12bc571c13 cmGeneratorTarget: Move GetAutoUicOptions from cmTarget. 2015-08-05 18:20:43 +02:00
Stephen Kelly 41abdc17df cmGeneratorTarget: Move GetSOName from cmTarget.. 2015-08-05 18:20:43 +02:00
Stephen Kelly ec38e4c84f Move GetFullPath to cmGeneratorTarget 2015-07-27 21:59:02 +02:00
Stephen Kelly dfb025bf12 Move GetLocationForBuild to cmGeneratorTarget. 2015-07-27 21:58:50 +02:00
Stephen Kelly 9f2dca805c Move GetLocation to cmGeneratorTarget. 2015-07-27 21:58:50 +02:00
Stephen Kelly a3b210fd6c cmGeneratorTarget: Require a cmLocalGenerator to construct. 2015-06-22 13:23:45 -04:00
Stephen Kelly b2b41b83ff cmGeneratorTarget: Add accessor for cmLocalGenerator. 2015-06-22 13:23:45 -04:00
Stephen Kelly ccbc225913 cmGeneratorTarget: Move Feature API from cmTarget. 2015-06-06 15:44:16 +02:00
Gilles Khouzam 01a9ab0def VS: Add support for XAML source files
XAML files are by default of type Page in the vcxproj and can be
overriden by setting the VS_XAML_TYPE property.  The .cpp and .h file
of the same name are automatically added as depending on the XAML file.

New VSXaml test builds a basic XAML WindowsStore 8.1 app with VS2013.
2015-04-03 13:40:35 -04:00
Stephen Kelly b734fa4471 Genex: Allow COMPILE_LANGUAGE when processing include directories.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:17 +01:00
Gilles Khouzam 401269e43b VS: Handle .pfx files explicitly in generator
Teach cmGeneratorTarget to classify .pfx files as package
certificate key files.  Teach cmVisualStudio10TargetGenerator
to write them as PackageCertificateKeyFile in .vcxproj files.

Inspired-by: Minmin Gong <minmin.gong@gmail.com>
2014-08-21 09:28:20 -04:00
Gilles Khouzam 23782171ad VS: Handle AppxManifest sources explicitly in generator
Teach cmGeneratorTarget to extract .appxmanifest sources separately.
Teach cmVisualStudio10TargetGenerator to write them with the
AppxManifest tool in .vcxproj files.  This will allow us to detect
whether the project provides an application manfiest explicitly.
2014-08-21 09:28:20 -04:00
Brad King 5d12b87b9d cmGeneratorTarget: Improve GetCreateRuleVariable API
Pass the language and configuration to the method so it can return the
complete rule variable name.
2014-05-21 09:38:24 -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 aa0a3562dd cmGeneratorTarget: Compute target objects on demand
Add a ComputeObjectMapping method to compute the object
names.  It takes mapping to populate as an out-parameter so
that it can be extended in the future with parameters
relevant to generator expression evaluation.

Remove the supporting cmGeneratorTarget::AddObject method. It is
no longer needed as the container member is populated directly.

The ComputeObjectMapping method is called whenever objects are
requested from the cmGeneratorTarget.  Because the Xcode generator
makes no such request, explicitly invoke the method from that
generator so that the logic of checking for bad sources in object
libraries is executed.

In a follow-up, the UseObjectLibraries usage may be replaced by a
true generator expression evaluator for TARGET_OBJECTS. That
will require generators to use cmGeneratorTarget::GetExternalObjects
which is not currently the case for Xcode and VS generators.
2014-04-02 23:12:57 +02:00
Stephen Kelly fdcefe3c42 cmGeneratorTarget: Compute consumed object libraries on demand.
Remove up-front object library computation from cmGlobalGenerator.

Adjust tests for message coming from the generator expression
evaluation.
2014-04-02 23:12:56 +02:00
Stephen Kelly c481fadc07 cmGeneratorTarget: Don't store ObjectSources for object libraries.
Compute them on demand instead.
2014-03-15 09:29:44 +01:00
Stephen Kelly 9ad804ac7b cmGeneratorTarget: Constify cmSourceFile* in containers.
Some of them will be used with other APIs which require value_type
to be cmSourceFile const*.
2014-03-13 15:27:23 +01:00
Stephen Kelly dcfcd23ed5 cmGeneratorTarget: Make GetSourceDepends const. 2014-03-13 15:27:23 +01:00
Stephen Kelly 6132d979d9 cmGeneratorTarget: Constify the AddExplicitObjectName API.
The storage is already const.
2014-03-13 15:27:23 +01:00
Stephen Kelly bc51221164 cmGeneratorTarget: Constify the AddObject API.
The storage is already const.
2014-03-13 15:27:23 +01:00
Ben Boeckel 84fdc9921c stringapi: Pass configuration names as strings 2014-03-08 13:05:36 -05:00
Ben Boeckel fabf1fbabb stringapi: Use strings in target name 2014-03-08 13:05:31 -05:00
Ben Boeckel ec97ed7d0c stringapi: Use strings for property names
Property names are always generated by CMake and should never be NULL.
2014-03-08 13:05:28 -05:00
Stephen Kelly 64d398416a cmGeneratorTarget: Classify sources on demand, not up front.
Implement a Visitor to hold the sequence of source file tests
for populating outputs.  Use VS 6 and 7 workaround from Brad
King for lack of partial template specialization and function
template specialization capabilities.

This will make it possible to use context dependent generator
expressions to determine the sources of a target.
2014-02-24 16:44:51 +01:00
Stephen Kelly d3682d8647 cmGeneratorTarget: Use a method to access the definition file. 2014-02-24 16:43:25 +01:00
Stephen Kelly 84e5f5a004 cmTarget: Move SourceFileFlags to cmGeneratorTarget. 2014-02-24 16:43:23 +01:00
Stephen Kelly 8fd0f2a718 cmGeneratorTarget: Hold a const global generator. 2014-01-12 20:18:11 +01:00
Stephen Kelly 531e40b95e cmTarget: Make GetSourceFiles populate an out-vector parameter.
In a future patch, this will also be populated with extra
sources from the linked dependencies.
2014-01-09 19:38:08 +01:00
Stephen Kelly 38de54cf6f cmGeneratorTarget: Add methods to access source file groups.
These methods and others will be able to get a config parameter
later to implement the INTERFACE_SOURCES feature.
2014-01-09 19:38:07 +01:00
Stephen Kelly a54eeddaae Constify cmGeneratorTarget access. 2013-12-11 15:30:11 +01:00
Stephen Kelly 259bf0918c Make the cmStrictTargetComparison operate on const cmTarget*. 2013-12-04 13:43:30 +01:00
Stephen Kelly abb13ea565 Order cmGeneratorTargetsType elements deterministically.
Define a custom ordering functor to deterministically and strictly
order the cmTarget* key. Otherwise the order would be dependent on
runtime pointer values, which breaks assumptions of some generators.

The functor orders first by target name, and then by directory. Multiple
global targets may have the same name, such as edit_cache, but their
directory differentiates them.
2013-11-22 15:06:25 +01:00
Stephen Kelly 0f876439e9 cmGeneratorTarget: Make GetIncludeDirectories const. 2013-11-19 18:07:04 +01:00
Stephen Kelly af4c1096f6 cmGeneratorTarget: Make some accessors const. 2013-11-03 22:27:28 +01:00
Stephen Kelly 07f5788385 Move TraceDependencies to cmGeneratorTarget. 2013-10-30 21:29:45 +01:00
Stephen Kelly 90ef1cfe48 Move GenerateTargetManifest to cmGeneratorTarget. 2013-10-27 20:29:45 +01:00
Stephen Kelly 25f1df3e81 Split CreateGeneratorTargets into two methods.
As the generate-time-related API is moving to cmGeneratorTarget, almost
all of generation code needs to be able to access instances of it.
2013-10-27 20:29:34 +01:00
Stephen Kelly 9cf3547e1c Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
Unlike other target properties, this does not have a corresponding
non-INTERFACE variant.

This allows propagation of system attribute on include directories
from link dependents.
2013-07-16 13:44:57 -04:00
Stephen Kelly f1fcbe3fde Add Target API to determine if an include is a system include.
The implementation can be modified later so that system includes
can be determined on a per-target basis.
2013-07-02 16:40:02 +02:00