summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'fix-CMP0046-warning'Brad King2014-03-131-4/+3
|\ | | | | | | | | d83245a3 cmTarget: Don't create duplicate backtraces in CMP0046 warning
| * cmTarget: Don't create duplicate backtraces in CMP0046 warningStephen Kelly2014-03-121-4/+3
| |
* | Remove some c_str() calls.Stephen Kelly2014-03-111-68/+68
| | | | | | | | | | | | 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-2/+2
|\ \ | |/ | | | | | | | | 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-2/+2
| | | | | | | | | | Policies CMP0027, CMP0038, and CMP0046 have per-target meaning so record the policy settings on targets as they are created.
* | stringapi: Miscellaneous char* parametersBen Boeckel2014-03-081-1/+2
| |
* | stringapi: Use strings for feature argumentsBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-131/+146
| |
* | cmTarget: Refactor GetLocation APIBrad King2014-03-081-16/+9
| | | | | | | | | | | | | | | | | | 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.
* | strings: Remove cmStdString referencesBen Boeckel2014-03-081-40/+40
| | | | | | | | | | | | | | | | | | | | | | 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-13/+15
| |
* | stringapi: Use strings for the languagesBen Boeckel2014-03-081-9/+11
| |
* | stringapi: Use strings for source namesBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Accept strings in cmStrCmpBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Use strings for property namesBen Boeckel2014-03-081-65/+53
| | | | | | | | Property names are always generated by CMake and should never be NULL.
* | Merge topic 'msvc-compiler-pdb-files'Brad King2014-02-261-5/+108
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | fba51b09 MSVC: Add properties to configure compiler PDB files (#14762) 3737860a cmTarget: Add per-config compilation info 718a9532 cmTarget: Refactor ComputePDBOutputDir interface aae5184c Help: Refactor PDB_NAME and PDB_OUTPUT_DIRECTORY docs b4aac0ca Makefile: Fix per-config linker PDB output directory
| * | MSVC: Add properties to configure compiler PDB files (#14762)Brad King2014-02-261-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files 2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY properties. Those properties now exclusively handle linker PDB files. Since STATIC libraries do not link their compiler PDB file becomes more important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB file location and pass the value to the MSVC /Fd option.
| * | cmTarget: Add per-config compilation infoBrad King2014-02-241-0/+46
| | | | | | | | | | | | | | | | | | | | | Add a cmTarget::CompileInfo struct to hold per-configuration information about the compilation settings in a target. This is different than cmTarget::OutputInfo because it applies to any targets that can compile sources even if they do not link or archive.
| * | cmTarget: Refactor ComputePDBOutputDir interfaceBrad King2014-02-241-5/+5
| |/ | | | | | | | | | | Add a runtime parameter to specify the property name prefix. Update the call site to pass "PDB" to preserve the existing name for that call path.
* | cmTarget: Add GetTransitiveTargetClosure method.Stephen Kelly2014-02-241-19/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace calls to GetLinkInformation with calls to a method to get only the target closure, not the link languages etc. The replaced calls are used while evaluating generator expressions only. This makes transitive generator expression evaluation independent from the languages of a target. In a follow-up topic, it will be possible to make the languages depend on generator expression evaluation, via evaluation of the SOURCES and INTERFACE_SOURCES target properties. Because the order of entries is not the same as the final link line, the order of debug output is different in the RunCMake.CompatibleInterface test, because the BOOL_PROP7 target property is evaluated first. Adjust the test to account for that new order.
* | cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibilityStephen Kelly2014-02-241-8/+9
| | | | | | | | This simplifies further refactoring.
* | cmTarget: Avoid computing languages when computing transitive targets.Stephen Kelly2014-02-241-9/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the OLD CMP0022 behavior, we need to treat the implementation as the interface when computing the interface libraries. Make it possible to do that without computing the link languages by adding a new GetLinkImplementationLibraries method. Extend the existing GetLinkImplementation method to populate the languages if the libraries have already been computed and cached. Change GetTransitivePropertyTargets to invoke GetLinkInterfaceLibraries instead of GetLinkInterface. This is key, as it is a method called by cmGeneratorExpressionEvaluator. Change the cmGeneratorExpressionEvaluator to invoke GetLinkImplementationLibraries instead of GetLinkImplementation.
* | cmTarget: Move ComputeLinkInterface to the internal class.Stephen Kelly2014-02-241-20/+28
| | | | | | | | | | In a follow-up, this will use the OptionalLinkInterface in its API. That class is in the cmTargetInternals class.
* | cmTarget: Extract a ComputeLinkInterfaceLibraries method.Stephen Kelly2014-02-241-70/+91
| | | | | | | | | | | | When evaluating the SOURCES property, we will need to be able to access the link libraries without accessing the link languages, as the languages depend on the SOURCES.
* | cmTarget: Re-arrange the ComputeLinkInterface method.Stephen Kelly2014-02-241-5/+15
| | | | | | | | | | | | | | | | Arrange the logic so that the part which deals with libraries only is at the top. In a follow-up commit, this will be split into two methods. Ensure that the explanatory CMP0022 comment is only present in one location.
* | cmTarget: Extract a ComputeLinkImplementationLanguages method.Stephen Kelly2014-02-241-0/+6
| |
* | cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.Stephen Kelly2014-02-241-4/+22
| | | | | | | | | | | | | | 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.
* | cmTarget: Find source files on request.Stephen Kelly2014-02-241-10/+4
| | | | | | | | | | | | In a follow-up, the list of sources will become dependent on the config, so check for existence in cmTarget::GetSourceFiles instead of up-front with cmGlobalGenerator::CheckTargets().
* | cmTarget: Move SourceFileFlags to cmGeneratorTarget.Stephen Kelly2014-02-241-108/+0
|/
* cmTarget: Don't try to get sources of an INTERFACE_LIBRARY.Stephen Kelly2014-02-141-0/+1
| | | | An an assert to ensure this.
* Add policy CMP0049 to avoid variable expansion in source listsStephen Kelly2014-02-121-0/+32
|
* cmTarget: Remove TODO comment.Stephen Kelly2014-02-111-2/+1
| | | | | The current behavior is desirable because while it is common to set a per-config suffix on libraries, it is not common for exexutables.
* CMP0028: Trigger on libraries from INTERFACE of dependencies.Stephen Kelly2014-02-091-46/+49
|
* cmTarget: Clean up the InsertCompileDefinition implementation.Stephen Kelly2014-02-021-7/+2
| | | | | | | It accepts a before parameter but is never called with before=true. compile definitions are sorted by std::set, so it wouldn't make sense to allow user sorting.
* cmMakefile: make some methods take const std::string& instead of const char*Rolf Eike Beer2014-01-161-10/+10
| | | | | | | | 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/+20
| | | | | Added new policy CMP0046 which requires dependencies added by add_dependencies() to actually exist.
* Merge topic 'minor-cleanups'Brad King2014-01-091-3/+4
|\ | | | | | | | | | | | | | | 531e40b cmTarget: Make GetSourceFiles populate an out-vector parameter. 38de54c cmGeneratorTarget: Add methods to access source file groups. f579fe0 Help: Fix link to MAP_IMPORTED_CONFIG_<CONFIG> 590d238 cmTarget: Handle NO_SYSTEM_FROM_IMPORTED.
| * cmTarget: Make GetSourceFiles populate an out-vector parameter.Stephen Kelly2014-01-091-3/+4
| | | | | | | | | | In a future patch, this will also be populated with extra sources from the linked dependencies.
* | cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.Stephen Kelly2014-01-081-8/+28
|/
* cmTarget: Fix system include annotation propagation.Stephen Kelly2014-01-061-56/+0
| | | | | | | | | | | | 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.
* cmTarget: Move a variable initialization closer to where it is used.Stephen Kelly2014-01-061-3/+1
| | | | This is more readable and easier to reason about.
* cmTarget: Remove some of the INTERFACE_LIBRARY whitelisted properties.Stephen Kelly2014-01-061-8/+8
| | | | | | | | | | | There is no need to allow EXCLUDE_* properties, because an INTERFACE_LIBRARY has no direct build output. IMPORTED_LINK_INTERFACE_LANGUAGES are relevant only to static libraries. VERSION is relevant only to the filename of direct build outputs, which INTERFACE_LIBRARY does not have.
* cmTarget: Enable convenient include dir handling for INTERFACE_LIBRARY.Stephen Kelly2014-01-061-0/+1
| | | | | Make the CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE variable affect INTERFACE_LIBRARY targets.
* cmTarget: Remove dead code.Stephen Kelly2014-01-061-1/+0
| | | | | Whitelisting of properties already ensures that the LOCATION property will not be read from an INTERFACE_LIBRARY.
* cmTarget: Use strtol for numeric parsing.Stephen Kelly2014-01-061-4/+10
| | | | | | On Windows apparently sscanf can not handle hex numbers. Test that numeric comparison works with hex numbers.
* cmTarget: Remove support for <CONFIG>_LOCATION property.Stephen Kelly2014-01-041-19/+0
| | | | | It is not documented, is very old, is compatibility code, is non-uniform and is not needed.
* cmTarget: Don't repeat property origin debug information.Stephen Kelly2014-01-041-6/+0
|
* cmTarget: Fix debug report for interface-set compatibility types.Stephen Kelly2014-01-041-30/+61
| | | | | | | | | | | | | | | | If the dependent target sets the property to boolean false, ensure that that appears in the debug report. Previously, the report output contained whether the property was consistent among dependencies, displaying 'TRUE', instead of the content of the property, which may be 'FALSE'. Return a std::pair from the consistentProperty method. This makes it possible to make the return value for string types easier to reason about. The return value of consistentProperty was previously set to an empty static string to emulate a 'true' value for the caller in commit 816b4a8a (cmTarget: Make consistentProperty return consistent content., 2013-10-22). The pair makes the consistency result properly typed.
* cmTarget: Fix reporting interface-set properties which are FALSE.Stephen Kelly2014-01-041-1/+1
|
* cmTarget: Fix the property compatibility error messageStephen Kelly2014-01-041-1/+2
| | | | | | | Don't refer to 'both', but a 'mixture'. List all compatible interface property types possible. Add another test for a mixture of three compatibilities.