| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Pass the language and configuration to the method so it can return the
complete rule variable name.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AddSource method accepts one file and tries to avoiding adding
it to the sources-list of the target if it already exists. This
involves creating many cmSourceFileLocation objects for matching
on existing files, which is an expensive operation.
Avoid the searching algorithm by appending the new sources as one
group. Generate-time processing of source files will ensure
uniqueness.
Add a new AddTracedSources for this purpose. The existing
AddSources method must process the input for policy CMP0049, but
as these source filenames come from cmSourceFile::GetFullPath(),
we can forego that extra processing.
|
|
|
|
|
|
|
|
| |
This reverses the decision in commit d38423ec (cmTarget: Add a
method to obtain list of filenames for sources., 2014-03-17). The
cmSourceFile based API is preferred because that avoids creation of
many cmSourceFileLocation objects for matching strings, and the
result is cached by cmTarget.
|
|
|
|
|
|
| |
Avoid calling GetSourceFiles with the same result container multiple
times when tracing target dependencies. The result from the previous
configuration is cached and used later otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When config-specifig generator expressions are supported, a target
may have SOURCES:
src1.cpp $<$<CONFIG:Debug>:src2.cpp> $<$<CONFIG:Release>:src3.cpp>
and computation in cmTargetTraceDependencies would add each of the
src2.cpp and src3.cpp sources back to the target without a
config-guard. That would make the sources be used later when
generating the buildsystem, regardless of the configuration.
Avoid calling AddSource on the target with the result of the
GetSourceFiles call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Remove up-front object library computation from cmGlobalGenerator.
Adjust tests for message coming from the generator expression
evaluation.
|
|
|
|
| |
Relieve cmGeneratorTarget of that responsibility.
|
| |
|
|
|
|
|
|
|
| |
Rely on evaluation in cmCustomCommandGenerator for the generators.
When tracing target dependencies, depend on the union of dependencies
for all configurations.
|
|
|
|
| |
Compute them on demand instead.
|
|
|
|
|
| |
Some of them will be used with other APIs which require value_type
to be cmSourceFile const*.
|
| |
|
|
|
|
| |
The storage is already const.
|
|
|
|
| |
The storage is already const.
|
|
|
|
|
|
| |
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
|
| |
|
|
|
|
|
|
|
|
|
| |
When given a non-NULL configuration the GetLocation returned the
location for the given configuration. When given a NULL configuration
the GetLocation method returned a location with the build-system
placeholder for the configuration name. Split the latter use case out
into a separate GetLocationForBuild method and update call sites
accordingly.
|
|
|
|
|
|
|
|
|
|
|
| |
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.
The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
|
| |
|
| |
|
|
|
|
| |
Property names are always generated by CMake and should never be NULL.
|
|
|
|
|
| |
The actual list of files will become config dependent in a follow-up
commit.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
The callers already skip non-targets, so unify the target search.
Change supporting functions to accept a container of targets instead
of strings where possible.
|
| |
|
|
|
|
| |
An an assert to ensure this.
|
|
|
|
|
|
|
|
| |
Most callers already have a std::string, on which they called c_str() to pass it
into these methods, which internally converted it back to std::string. Pass a
std::string directly to these methods now, avoiding all these conversions.
Those methods that only pass in a const char* will get the conversion to
std::string now only once.
|
| |
|
|
|
|
|
| |
In a future patch, this will also be populated with extra
sources from the linked dependencies.
|
|
|
|
|
| |
These methods and others will be able to get a config parameter
later to implement the INTERFACE_SOURCES feature.
|
|
|
|
|
| |
This handling was lost in commit faedd2be (cmTarget: Fix system include
annotation propagation., 2014-01-01).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Direct users of IMPORTED targets treat INTERFACE_INCLUDE_DIRECTORIES
as SYSTEM, after commit a63fcbcb (Always consider includes from IMPORTED
targets to be SYSTEM., 2013-08-29). It was intended that transitive
use of an IMPORTED target would have the same behavior, but that
did not work. The implementation processed only direct dependencies
in cmTarget::FinalizeSystemIncludeDirectories.
Implement transitive evaluation of dependencies by traversing the
link interface of each target in the link implementation.
|
| |
|
|
|
|
|
| |
The output directory must be unique, but the source directory
of an add_subdirectory call may be re-used.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
07f5788 Move TraceDependencies to cmGeneratorTarget.
fa03777 Do not populate SourceEntries in AddSourceFile.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| | |
638843a Remove the Location member from cmTarget.
90ef1cf Move GenerateTargetManifest to cmGeneratorTarget.
25f1df3 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.
|
|/ |
|
|
|
|
|
| |
The input dir being tested is normalized, so ensure that the entries
in the vector are normalized too (eg no trailing slash).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Entries from the cmMakefile are processed and maintained similarly
to other include directories. The include_directories(SYSTEM)
signature affects all following targets, and all prior targets
in the same makefile.
|
|
|
|
|
| |
The implementation can be modified later so that system includes
can be determined on a per-target basis.
|