summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
Commit message (Collapse)AuthorAgeFilesLines
* OS X: Add handling for XCTest bundlesGregor Jasny2015-03-231-0/+3
| | | | | | | | | | An XCTest bundle is a CFBundle with a special product-type and bundle extension. For more information about XCTest visit the Mac Developer library at: http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* Genex: Allow COMPILE_LANGUAGE when processing include directories.Stephen Kelly2015-03-091-1/+2
| | | | Issue an error if this is encountered by an IDE generator.
* Genex: Allow COMPILE_LANGUAGE when processing compile definitions.Stephen Kelly2015-03-091-1/+2
| | | | Issue an error if this is encountered by an IDE generator.
* Genex: Enable use of COMPILE_LANGUAGE for compile options.Stephen Kelly2015-03-091-1/+2
| | | | | | Follow-ups will allow the use of the generator expression for compile definitions and include directories for non-IDE generators.
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | All compilers hosting CMake support the std class.
* cmTarget: Track internally whether platform is AndroidBrad King2014-09-291-0/+1
| | | | Add an IsAndroid member to save whether CMAKE_SYSTEM_NAME is "Android".
* cmTarget: Avoid re-computing head-independent link interfacesBrad King2014-07-211-1/+2
|
* cmTarget: Move ComputeLinkImplementation* to internalsBrad King2014-07-211-5/+0
| | | | | There are no external callers, and this will allow the methods to see the full OptionalLinkImplementation internal structure.
* Merge topic 'dev/target-fastpaths'Brad King2014-07-181-0/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a9c9b66c cmTarget: use a hash_map for cmTargets typedef bcb6dbc1 cmTarget: help the optimizer a bit 679f3dee cmTarget: use hash_set for sets of strings 23d6520d cmTarget: Allow caching of empty genex expansions cd54f1db cmTarget: Only copy GenEx expansions when necessary b75fc0e1 cmTarget: Don't set properties on custom targets 66076915 cmTarget: Use static strings for special property names cebefa71 cmTarget: Sort special property checks 97ce676e cmTarget: Fast path for regular properties 4cfa918a cmTarget: Factor out common code 85242b7d cmTarget: Use else/if trees rather than an if tree
| * cmTarget: use a hash_map for cmTargets typedefBen Boeckel2014-07-171-0/+7
| |
* | cmTarget: Cache compatible interface property setsBrad King2014-07-161-0/+10
| | | | | | | | | | | | | | Replace isLinkDependentProperty with a CompatibleInterfaces structure that records all the compatible interface properties in a set for each type. This avoids repeatedly traversing the link implementation closure and asking every target for its compatible interface properties.
* | cmTarget: Drop GetTransitivePropertyTargets methodBrad King2014-07-161-3/+0
| | | | | | | | Inline the implementation at the only remaining call site.
* | cmTarget: Make GetLink*Libraries methods safer to useBrad King2014-07-161-16/+22
|/ | | | | | | | Split the library lists out of LinkImplementation and LinkInterface into LinkImplementationLibraries and LinkInterfaceLibraries parent classes, respectively. Return these from GetLinkImplementationLibraries and GetLinkInterfaceLibraries, respectively, so that callers cannot access parts of the structures that have not been populated.
* Merge topic 'refactor-link-internals'Brad King2014-07-161-14/+4
|\ | | | | | | | | | | | | | | | | | | | | | | 1ca0c0e9 cmTarget: Refactor internal imported LinkInterface map 102eea60 cmTarget: Simplify internal ComputeLinkInterfaceLibraries method b0f57408 cmTarget: Move ComputeLinkInterfaceLibraries to internals c69e8a55 cmTarget: Refactor internal LinkInterface map 4db3990e cmTarget: Drop 'head' argument from processSources 4b8130b8 cmTarget: Drop 'head' argument from GetSourceFiles 4c763dd1 cmTarget: Drop 'head' argument from GetLanguages 190cabe7 cmTarget: Drop 'head' argument from ComputeLinkImplementationLanguages
| * cmTarget: Move ComputeLinkInterfaceLibraries to internalsBrad King2014-07-141-6/+0
| | | | | | | | | | There are no external callers, and this will allow the method to see the full OptionalLinkInterface internal structure.
| * cmTarget: Drop 'head' argument from GetSourceFilesBrad King2014-07-141-4/+2
| | | | | | | | No call sites need it to be anything but 'this'.
| * cmTarget: Drop 'head' argument from GetLanguagesBrad King2014-07-141-2/+1
| | | | | | | | No call sites need it to be anything but 'this'.
| * cmTarget: Drop 'head' argument from ComputeLinkImplementationLanguagesBrad King2014-07-141-2/+1
| | | | | | | | No call sites need it to be anything but 'this'.
* | cmTarget: Compile old-style link dependencies only for VS 6Brad King2014-07-141-3/+10
| | | | | | | | | | Compile all the "ForVS6" cmTarget members only on Windows. No other platforms support the VS 6 generator.
* | cmTarget: Rename old-style link dependencies code as "ForVS6"Brad King2014-07-141-19/+19
|/ | | | | | The old link dependency analysis is now needed only for the VS 6 generator code delimited by CM_USE_OLD_VS6 to support project-provided project templates. Rename the related cmTarget members to be "ForVS6".
* cmTarget: Add to LinkImplementation whether each library was a genexBrad King2014-07-071-4/+6
| | | | | | Implementation of CMP0027 OLD behavior needs to know whether each entry in LinkImplementation::Libraries came from a generator expression or not. Add a FromGenex member to cmLinkImplItem to record this.
* cmTarget: Add to LinkImplementation a backtrace for each libraryBrad King2014-07-071-4/+6
| | | | Allow clients to provide backtrace context on evaluation diagnostics.
* cmTarget: Refactor LinkImplementation to allow more informationBrad King2014-07-071-1/+11
| | | | | | | 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: Teach GetLinkInterfaceLibraries to support $<LINK_ONLY>Brad King2014-06-251-3/+5
| | | | | | | Add a 'usage_requirements_only' parameter to GetLinkInterfaceLibraries and supporting internal APIs to pass through to ExpandLinkItems so it knows whether to use SetTransitivePropertiesOnly while evaluating generator expressions.
* cmTarget: Teach ExpandLinkItems how to support $<LINK_ONLY>Brad King2014-06-251-0/+1
| | | | | | | Add a 'usage_requirements_only' parameter to ExpandLinkItems so that it knows whether to use SetTransitivePropertiesOnly while evaluating generator expressions. Update existing call sites to pass 'false' since they are for linking and not usage requirements.
* cmTarget: Drop GetDirectLinkLibraries methodsBrad King2014-06-231-5/+0
| | | | | Inline the implementation in the last remaining caller and drop the methods.
* cmTarget: Lookup targets in LinkInterface and LinkImplementationBrad King2014-06-231-6/+8
| | | | | | | | | | | | | | | 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-0/+1
| | | | | | | 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: Add cmLinkItem to refer to a target by name and pointerBrad King2014-06-231-0/+12
| | | | | | | | Many items named in target_link_libraries calls are targets, but not all. Create a cmLinkItem type that acts like std::string so it can name an item but also has a pointer to a cmTarget that is the result of looking up the item name in the referencing target's scope. This will be useful to avoid duplicate lookup operations later.
* cmTarget: Add method to lookup other targets in a target's scopeBrad King2014-06-231-0/+2
| | | | | Move the main implementation of cmComputeLinkDepends::FindTargetToLink into cmTarget.
* cmTarget: Constify GetLinkImplementationClosure resultsBrad King2014-06-231-1/+1
| | | | Populate a vector of "cmTarget const*" instead of "cmTarget*".
* cmTarget: Constify GetTransitivePropertyTargets resultsBrad King2014-06-231-2/+2
| | | | Populate a vector of "cmTarget const*" instead of "cmTarget*".
* cmTarget: Drop 'head' target from GetImportInfoBrad King2014-06-231-4/+7
| | | | | | | Move generator expression evaluation for imported library lists out of GetImportInfo and into a new GetImportLinkInterface helper. This avoids duplicating the computation and storage of all imported target info just because some of it is parameterized on the 'head' target.
* cmTarget: Remove 'head' argument from GetLinkImplementationBrad King2014-06-231-7/+11
| | | | | | | | | | | | | 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.
* cmTarget: Drop 'head' argument from GetLinkClosureBrad King2014-06-231-4/+2
| | | | It is only ever passed the 'this' target itself.
* cmTarget: Remove 'head' argument from GetLinkerLanguageBrad King2014-06-231-2/+1
| | | | | | It is only ever called with the 'this' target as the head. Co-Author: Stephen Kelly <steveire@gmail.com>
* cmTarget: Remove 'head' argument from GetLinkInformationBrad King2014-06-231-6/+4
| | | | | | No call sites use it anyway. Co-Author: Stephen Kelly <steveire@gmail.com>
* cmTarget: Cache GetLinkImplementationClosure resultsBrad King2014-06-231-2/+2
| | | | | Store them internally and return by reference to avoid duplicate computation.
* cmTarget: Rename Get{TransitiveTarget => LinkImplementation}ClosureBrad King2014-06-231-2/+2
| | | | | The method computes the transitive closure of targets starting with the current target link implementation libraries. Clarify the name.
* cmTarget: Remove 'head' argument from GetTransitiveTargetClosureBrad King2014-06-231-1/+0
| | | | The method is never called with any headTarget besides "this".
* cmTarget: De-duplicate library list expansionBrad King2014-06-231-0/+4
| | | | | | | Create an ExpandLinkItems method to handle evaluation of generator expressions in a library list and expansion of the ;-list into a vector. Replace some duplicate copies of the implementation with calls to the new helper.
* cmTarget: Remove unused GetInterfaceLinkLibraries methodBrad King2014-06-231-3/+0
|
* Merge topic 'ninja-intel-ipo'Brad King2014-05-221-0/+2
|\ | | | | | | | | | | | | b6e2e0d1 Ninja: Fix Intel interprocedural optimization with static libraries 5d12b87b cmGeneratorTarget: Improve GetCreateRuleVariable API c2eeb08b cmTarget: Add GetFeatureAsBool method
| * cmTarget: Add GetFeatureAsBool methodBrad King2014-05-211-0/+2
| | | | | | | | Return the GetFeature method result converted to a boolean value.
* | Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-211-0/+7
|/ | | | | | | | | | | | Allow setting build properties based on the features available for a target. The availability of features is determined at generate-time by evaluating the link implementation. Ensure that the <LANG>_STANDARD determined while evaluating COMPILE_FEATURES in the link implementation is not lower than that provided by the INTERFACE of the link implementation. This is similar to handling of transitive properties such as POSITION_INDEPENDENT_CODE.
* cmTarget: Evaluate CMP0026 and CMP0051 in calling contextBrad King2014-05-091-1/+2
| | | | | | | | | | | These policies should be checked at the call site that tries to access the LOCATION or SOURCES property, not the directory scope containing the target. Thread the caller context through cmTarget::GetProperty to use for checking the policy setting and emitting a diagnostic with proper backtrace. Extend the RunCMake.CMP0026 and RunCMake.CMP0051 tests with cross-directory cases.
* cmTarget: Drop unused GetProperty signatureBrad King2014-05-091-2/+0
| | | | | No callers use the second "scope" argument. Drop this signature and hard-code the default parameter value internally.
* Merge topic 'target_compile_features'Brad King2014-04-151-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9eaf3755 Export: Populate INTERFACE_COMPILE_FEATURES property. 8ed59fc2 Add target_compile_features command. 4e6ca504 cmTargetPropCommandBase: Change the interface to return bool. 5412dede cmTarget: Transitively evaluate compiler features. baff4434 cmTarget: Allow populating COMPILE_FEATURES using generator expressions. f97bf437 Features: Add cxx_auto_type. 03355d6b cmTarget: Add COMPILE_FEATURES target property. faeddf64 project: Add infrastructure for recording CXX compiler features 913394af cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties. 8238a6cd Add some COMPILE_OPTIONS for specifying C++ dialect. 892243fc Tests: Require CMake 3.0 for the SystemInformation test. 59b5fdd3 Don't load Clang-CXX from AppleClang-CXX.
| * cmTarget: Transitively evaluate compiler features.Stephen Kelly2014-04-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | Extend the interface of the target_compile_features command with PUBLIC and INTERFACE keywords. Populate the INTERFACE_COMPILER_FEATURES target property if they are set. Consume the INTERFACE_COMPILER_FEATURES target property from linked dependent targets to determine the final required compiler features and the compile flag, if needed. Use the same pattern of origin-debugging which is used for other build properties.
| * cmTarget: Allow populating COMPILE_FEATURES using generator expressions.Stephen Kelly2014-04-071-0/+1
| | | | | | | | | | | | Delay validation of the content as a feature if it contains a generator expression. It will be checked again at generate-time after evaluation.