summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeTargetDepends.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
* cmGeneratorTarget: Add GetUtilityBacktrace APIStephen Kelly2015-10-271-1/+1
|
* Port to GetGeneratorTargets.Stephen Kelly2015-10-241-5/+4
|
* Access policy status from cmGeneratorTarget at generate time.Stephen Kelly2015-10-201-1/+1
|
* cmGeneratorTarget: Provide direct access to the backtrace.Stephen Kelly2015-10-201-1/+1
|
* cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget.Stephen Kelly2015-10-201-2/+2
|
* Use IsImported from cmGeneratorTarget.Stephen Kelly2015-10-161-1/+1
|
* cmState: Move GetTargetTypeName from cmTarget.Stephen Kelly2015-10-141-2/+1
|
* Remove now-obsolete casts.Stephen Kelly2015-10-141-1/+1
|
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-11/+11
| | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* Generators: Use GetType from the cmGeneratorTarget.Stephen Kelly2015-10-141-1/+2
|
* cmLinkItem: Port to cmGeneratorTarget.Stephen Kelly2015-10-121-15/+9
|
* cmGeneratorTarget: Move GetUtilityItems from cmTarget.Stephen Kelly2015-10-121-2/+2
|
* cmGeneratorTarget: Port GetLinkInterface away from cmTarget.Stephen Kelly2015-10-101-1/+1
|
* cmGeneratorTarget: Move GetLinkImplementation from cmTarget.Stephen Kelly2015-08-261-2/+1
|
* cmLinkItem: Add cmLinkImplementation type.Stephen Kelly2015-08-261-1/+1
|
* cmGeneratorTarget: Move GetLinkInterface from cmTarget.Stephen Kelly2015-08-261-1/+1
|
* cmTarget: Move link interface libraries struct out.Stephen Kelly2015-08-261-1/+1
|
* cmComputeTargetDepends: Change API to use cmGeneratorTarget.Stephen Kelly2015-07-011-37/+44
|
* Merge topic 'refactor-cmPolicies'Brad King2015-05-051-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 013ada80 cmPolicies: Implement PolicyMap in terms of bitset. be6664c2 cmPolicies: Implement abstraction for PolicyMap. de211686 Port to static cmPolicies API. 13981f20 cmPolicies: Make all API static. 23e2bcc8 cmPolicies: Remove unused DefinePolicy method. 5641ba4f cmPolicies: Remove unused cmPolicy class. 3de54497 cmPolicies: Loop over all policies using enum constants. 387aff20 cmPolicies: Trivialize GetPolicyStatus method. dbf680d6 cmPolicies: Use more-direct ID access. 8c204133 cmPolicies: Implement in terms of public API. e3a8c029 cmPolicies: Make private method file-static. cb765af0 cmPolicies: Implement short description access with XMacros. 5df267fa cmPolicies: Implement version check with XMacro. 2235cfeb cmPolicies: Implement id to version with XMacro. 05d84388 cmPolicies: Implement id to string conversion with XMacro. 6eaade8a cmPolicies: Introduce XMacro table for policy data. ...
| * Port to static cmPolicies API.Stephen Kelly2015-05-041-3/+1
| |
* | cmComputeTargetDepends: Use simpler global generator access.Stephen Kelly2015-05-031-3/+1
|/
* Port Global property interaction to cmState.Stephen Kelly2015-04-151-2/+5
|
* Allow add_dependencies() on INTERFACE libraries (#15414)Brad King2015-03-271-2/+4
| | | | | | | | | | Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with INTERFACE_LIBRARY, 2013-12-25). Teach our dependency analysis to transitively follow INTERFACE target utility dependencies as was done or IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on imported targets, 2010-11-19). Extend the InterfaceLibrary test with a case to cover header generation for a header-only INTERFACE library via a custom target.
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-2/+2
| | | | All compilers hosting CMake support the std class.
* cmTarget: Refactor LinkImplementation to allow more informationBrad King2014-07-071-1/+1
| | | | | | | Create a cmLinkImplItem class derived from cmLinkItem so more information can be added to link implementation entries than link interface entries. Convert the LinkImplementation Libraries member to hold it. Update client sites accordingly.
* cmTarget: Lookup targets in LinkInterface and LinkImplementationBrad King2014-06-231-15/+15
| | | | | | | | | | | | | | | Instead of storing just the string names in these structures, lookup any target associated with each item and store its cmTarget pointer. Use the cmLinkItem class to hold the name and pointer together. Update client sites to use the pre-stored lookup result instead of looking up the target name again. Create a cmTarget::LookupLinkItems helper method to handle the lookup. Since lookups are now moving from cmComputeLinkDepends::AddLinkEntries to cmTarget::LookupLinkItems, move use of CheckCMP0004 to the latter. This drops use of CheckCMP0004 from entries added for _LIB_DEPENDS variables by cmComputeLinkDepends::AddVarLinkEntries, but I do not think that use was intentional originally anyway.
* cmTarget: Add GetUtilityItems to get target ordering dependenciesBrad King2014-06-231-4/+3
| | | | | | | Add a method like GetUtilities but that provides the target names already looked up and resolved to cmTarget pointers internally. Update call site in cmComputeTargetDepends::AddTargetDepend to use the already-found target instead of looking it up again.
* cmTarget: Remove 'head' argument from GetLinkImplementationBrad King2014-06-231-1/+1
| | | | | | | | | | | | | Many of the 'head' arguments added by commit v2.8.11~289^2~1 (Make linking APIs aware of 'head' target, 2013-01-04) turned out not to be needed. The "link implementation" of a target never needs to be computed with anything but itself as the 'head' target (except for CMP0022 OLD behavior because then it is the link interface). Remove the unused 'head' target paths. Add "internal" versions of cmTarget::GetDirectLinkLibraries and GetLinkImplementationLibraries to support the CMP0022 OLD behavior without otherwise exposing the 'head' target option of these methods.
* cmComputeTargetDepends: Remove unused 'linking' argumentBrad King2014-06-231-6/+3
| | | | | The AddInterfaceDepends method is never called with a non-true value for its 'linking' argument. Drop it.
* cmake: remove dummy backtraces for IssueMessageBen Boeckel2014-06-051-4/+6
|
* Merge topic 'target-transitive-sources'Brad King2014-04-031-42/+28
|\ | | | | | | | | | | | | | | | | | | | | 9407174b target_sources: New command to add sources to target. 81ad69e0 Make the SOURCES target property writable. 6e636f2e cmTarget: Make the SOURCES origin tracable. 3676fb49 cmTarget: Allow transitive evaluation of SOURCES property. e6971df6 cmTarget: Make the source files depend on the config. df753df9 cmGeneratorTarget: Don't add computed sources to the target. 869328aa cmComputeTargetDepends: Use valid config to compute target depends.
| * cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-021-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * cmComputeTargetDepends: Use valid config to compute target depends.Stephen Kelly2014-04-021-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CMAKE_BUILD_TYPE is set, and user code contains: target_link_libraries(myexe prefix_$<$<CONFIG:Debug>:debug>) then the computation with an empty config was computing a target-level dependency on a target or library called prefix_, and a dependency on a target or library called prefix_debug (as expected). The existing logic skips 'prefix_' because it is not a known target, and defers to the link-dependencies logic to find the library. The link-dependencies logic does not incorrectly handle the config as cmComputeTargetDepends did, and so did not encounter 'prefix_' during its computation. This likely had no effect on the generated buildsystem.
* | Merge topic 'target-sources-refactor'Brad King2014-04-031-0/+29
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources. aa0a3562 cmGeneratorTarget: Compute target objects on demand 042c1c83 cmTarget: Compute languages from object libraries on demand. fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand. c355d108 cmComputeTargetDepends: Track object library depends. e5da9e51 cmTarget: Allow any generator expression in SOURCES property. 5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. 857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages 28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand. bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression. 8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES. 4959f341 cmSourceFileLocation: Collapse full path for directory comparisons. fcc92878 cmSourceFileLocation: Remove unused Update method. 59e8740a cmTarget: Remove AddSourceFile method 26d494ba cmTarget: Use string API to add sources to cmTarget objects. d38423ec cmTarget: Add a method to obtain list of filenames for sources. ...
| * cmComputeTargetDepends: Track object library depends.Stephen Kelly2014-04-021-0/+29
| | | | | | | | Relieve cmGeneratorTarget of that responsibility.
* | Merge topic 'fix_policy_diagnostics'Brad King2014-04-011-3/+4
|\ \ | |/ |/| | | | | 77b581c2 Policies: omit warnings about unset policies when they are actually set to NEW
| * Policies: omit warnings about unset policies when they are actually set to NEWNils Gladitz2014-03-311-3/+4
| |
* | Remove some c_str() calls.Stephen Kelly2014-03-111-9/+9
| | | | | | | | | | | | 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.
* | Merge topic 'fix-policy-scopes'Brad King2014-03-101-1/+1
|\ \ | |/ | | | | | | | | 50fd0a33 Tests: Simplify and document policy scopes in RunCMake.CMP* tests b1bbee3e Record more policies on targets when created
| * Record more policies on targets when createdBrad King2014-03-061-1/+1
| | | | | | | | | | Policies CMP0027, CMP0038, and CMP0046 have per-target meaning so record the policy settings on targets as they are created.
* | stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-3/+3
| |
* | strings: Remove cmStdString referencesBen Boeckel2014-03-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | 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.
* | stringapi: Use strings in target nameBen Boeckel2014-03-081-7/+8
|/
* cmMakefile: make some methods take const std::string& instead of const char*Rolf Eike Beer2014-01-161-1/+1
| | | | | | | | 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.
* AddDependencies: new policy requires dependencies to existNils Gladitz2014-01-121-0/+39
| | | | | Added new policy CMP0046 which requires dependencies added by add_dependencies() to actually exist.
* Constify handling of target dependencies.Stephen Kelly2013-12-111-20/+22
|
* Remove INTERFACE build targets.Stephen Kelly2013-12-101-18/+7
| | | | | | | | | | | | | | | Commit b04f3b9a (Create make rules for INTERFACE_LIBRARY targets., 2013-08-21) extended the makefile generator to create build targets for INTERFACE_LIBRARY targets. No other generators were extended with this feature. This conflicts with the feature of whitelisting of target properties read from INTERFACE_LIBRARY targets. The INTERFACE_* properties of the INTERFACE_LIBRARY may legitimately contain TARGET_PROPERTY generator expressions for reading properties from the 'head target'. The 'head target' would be the INTERFACE_LIBRARY itself when creating the build rules for it, which means that non-whitelisted properties would be read.
* INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-1/+9
| | | | | | | | | | | | | As an INTERFACE_LIBRARY has no direct link dependencies, we can short-circuit in cmGeneratorExpressionEvaluator and in cmGlobalGenerator::CheckLocalGenerators. As they do not generate any output directly, any generate- or install- related code acn also be short-circuited. Many of the local generators already do this. Because only INTERFACE related properties make sense on INTERFACE_LIBRARY targets, avoid setting other properties, for example via defaults.
* Create make rules for INTERFACE_LIBRARY targets.Stephen Kelly2013-10-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The result is that the depends of the target are created. So, add_library(somelib foo.cpp) add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp) add_library(extra EXCLUDE_FROM_ALL foo.cpp) target_link_libraries(anotherlib extra) add_library(iface INTERFACE) target_link_libraries(iface INTERFACE anotherlib) Executing 'make iface' will result in the anotherlib and extra targets being made. Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY will not result in the executable being built with 'make iface' because of the logic in cmComputeTargetDepends::AddTargetDepend. So far, this is implemented only for the Makefile generator. Other generators will follow if this feature is possible for them. Make INTERFACE_LIBRARY targets part of the all target by default. Test this by building the all target and making the expected library EXCLUDE_FROM_ALL.
* Add entire link interface transitive closure as target depends.Stephen Kelly2013-07-021-0/+2
| | | | | | | This was missing from commit 30962029 (Make targets depend on the link interface of their dependees., 2012-12-26), which caused only immeditate entries of the link interface to become target depends.