summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeTargetDepends.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add LINK_LIBRARIES property for direct target link dependenciesStephen Kelly2013-01-081-7/+33
| | | | | | | | | | | | | | | | | | | Previously we kept direct link dependencies in OriginalLinkLibraries. The property exposes the information in the CMake language through the get/set_property commands. We preserve the OriginalLinkLibraries value internally to support old APIs like that for CMP0003's OLD behavior, but the property is now authoritative. This follows up from commit d5cf644a (Split link information processing into two steps, 2012-11-01). This will be used later to populate the link interface properties when exporting targets, and will later allow use of generator expressions when linking to libraries with target_link_libraries. Also make targets depend on the (config-specific) union of dependencies. CMake now allows linking to dependencies or not depending on the config. However, generated build systems are not all capable of processing config-specific dependencies, so the targets depend on the union of dependencies for all configs.
* Make linking APIs aware of 'head' targetStephen Kelly2013-01-081-1/+2
| | | | | | | | | | | The 'head' is the dependent target to be linked with the current target. It will be used to evaluate generator expressions with proper handling of mapped configurations and is used as the source target of properties. This requires that memoization is done with a key of a pair of target and config, instead of just config, because now the result also depends on the target. Removing the memoization entirely is not an option because it slows cmake down considerably.
* Make targets depend on the link interface of their dependees.Stephen Kelly2013-01-031-0/+59
|
* Run vim spellcheck on some filesYury G. Kudryashov2012-02-291-1/+1
|
* Refactor TargetTypeNames.Nicolas Despres2011-10-021-1/+1
| | | | | | Make it a static method instead of an array. It is safer for the type checking and if we add a new target type we will be warned to add a case to the switch.
* Do not crash when an imported target depends on a missing targetBrad King2011-08-041-3/+5
| | | | | Commit e01cce28 (Allow add_dependencies() on imported targets, 2010-11-19) forgot to check if the dependee exists before using it.
* Allow add_dependencies() on imported targets (#10395)Brad King2010-11-191-23/+34
| | | | | | | Imported targets do not themselves build, but we can follow dependencies through them to find real targets. This allows imported targets to depend on custom targets that provide the underlying files at build time.
* Record edge type in global dependency graphBrad King2010-11-181-5/+7
| | | | Each inter-target dependency may be a 'link' or 'util' dependency.
* Honor strong intra-component target dependenciesBrad King2010-08-251-22/+85
| | | | | | | | Strong dependencies (created by add_dependencies) must be honored when linearizing a strongly-connected component of the target dependency graph. The initial graph edges have strong/weak labels and can contain cycles that do not consist exclusively of strong edges. The final graph never contains cycles so all edges can be strong.
* Distinguish "strong" and "weak" target dependency edgesBrad King2010-08-251-10/+16
| | | | | | Utility dependencies are "strong" because they must be enforced to generate a working build. Link dependencies are "weak" because they can be broken in the case of a static library cycle.
* Split notion of node lists and edge listsBrad King2010-08-251-8/+8
|
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* Create GLOBAL_DEPENDS_NO_CYCLES propertyBrad King2009-08-241-2/+18
| | | | | This global property disallows cycles in the inter-target dependency graph even among STATIC libraries. See issue #9444.
* BUG: Avoid bogus dependency on executable targetsBrad King2008-08-061-3/+14
| | | | | | | | | | | | When an executable target within the project is named in target_link_libraries for another target, but the executable does not have the ENABLE_EXPORTS property set, then the executable cannot really be linked. This is probably a case where the user intends to link to a third-party library that happens to have the same name as an executable target in the project (or else will get an error at build time). We need to avoid making the other target depend on the executable target incorrectly, since the executable may actually want to link to that target and this is not a circular depenency.
* ENH: Improve readability of circular depends errorBrad King2008-08-061-2/+2
| | | | | | When reporting the dependencies in a strongly connected component quote the target names to make the message more readable no matter the target name.
* ENH: Improve link line generation for static library cycles.Brad King2008-02-071-166/+70
| | | | | | | | | - Move Tarjan algorithm from cmComputeTargetDepends into its own class cmComputeComponentGraph - Use cmComputeComponentGraph to identify the component DAG of link dependencies in cmComputeLinkDepends - Emit non-trivial component members more than once but always in a contiguous group on the link line
* ENH: Analyze inter-target dependencies to safely fix cyclesBrad King2008-02-061-0/+527
- Cycles may be formed among static libraries - Native build system should not have cycles in target deps - Create cmComputeTargetDepends to analyze dependencies - Identify conneced components and use them to fix deps - Diagnose cycles containing non-STATIC targets - Add debug mode property GLOBAL_DEPENDS_DEBUG_MODE - Use results in cmGlobalGenerator as target direct depends