summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmTarget: Transitively evaluate compiler features.Stephen Kelly2014-04-071-10/+111
| | | | | | | | | | | 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/+16
| | | | | | Delay validation of the content as a feature if it contains a generator expression. It will be checked again at generate-time after evaluation.
* cmTarget: Add COMPILE_FEATURES target property.Stephen Kelly2014-04-071-0/+40
| | | | | | | Use the contents of it to upgrade the CXX_STANDARD target property, if appropriate. This will have the effect of adding the -std=c++11 compile flag or other language specification on GNU when that is needed for the feature.
* cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties.Stephen Kelly2014-04-071-0/+2
| | | | | These are used to determine whether to add -std=c++11, -std=gnu++11 etc flags on the compile line.
* cmTarget: Cache the cmSourceFiles in GetSourceFiles.Stephen Kelly2014-04-061-9/+30
| | | | | | 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.
* cmTarget: Extract a ProcessSourceItemCMP0049 method.Stephen Kelly2014-04-061-9/+39
| | | | | | | | | | Avoid calling AddSource for each src filename. That involves checking each entry for uniqueness and creating a separate generator expression for each one. Instead, add a single entry for the list of sources. The source files are passed through a uniqueness filter at generate-time, so duplicates don't matter so much.
* cmTarget: Remove abort() after INTERNAL_ERROR reportsBrad King2014-04-031-2/+0
| | | | | After reporting an internal error we should continue rather than aborting. Remove such statements that are left from debugging.
* Merge topic 'target-transitive-sources'Brad King2014-04-031-34/+287
|\ | | | | | | | | | | | | | | | | | | | | 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.
| * Make the SOURCES target property writable.Stephen Kelly2014-04-021-0/+38
| |
| * cmTarget: Make the SOURCES origin tracable.Stephen Kelly2014-04-021-3/+36
| |
| * cmTarget: Allow transitive evaluation of SOURCES property.Stephen Kelly2014-04-021-35/+156
| | | | | | | | | | | | | | Extend the cmGeneratorExpressionDAGChecker with an interface returning the name of the top target. Use that to determine when there is a DAG violation, as required by the RunCMake.Languages tests.
| * cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-021-12/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'target-sources-refactor'Brad King2014-04-031-62/+251
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ...
| * | Genex: Only evaluate TARGET_OBJECTS to determine target sources.Stephen Kelly2014-04-021-0/+1
| |/ | | | | | | | | | | | | | | | | | | The output of this expression may contain macros for IDEs to replace such as $(Configuration), $(CURRENT_ARCH) etc. To avoid generating content which is not usable in other contexts, report an error if there is an attempt to use it in other contexts. This commit may be reverted in the future if a solution to the above difference is implemented.
| * cmTarget: Compute languages from object libraries on demand.Stephen Kelly2014-04-021-20/+47
| |
| * cmTarget: Allow any generator expression in SOURCES property.Stephen Kelly2014-04-021-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove use of UseObjectLibraries from Makefile and Ninja generators. It is not needed now because those generators use GetExternalObjects which already contains the objects from object libraries. The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects methods. Ensure that duplicates are not created by skipping objects from object libraries in handling of GetExternalObjects. Similarly, fix VS6, VS7 and Xcode object handling by skipping external objects from OBJECT_LIBRARY usage as appropriate. The error message in the BadSourceExpression1 test is now reported by the generator expression evaluator, so it has different text.
| * cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.Stephen Kelly2014-04-021-11/+58
| | | | | | | | Add policy CMP0051 to control this behavior.
| * cmTarget: Store strings instead of cmSourceFile* to represent SOURCES.Stephen Kelly2014-03-311-41/+135
| | | | | | | | | | | | | | This will allow the strings to contain generator expressions. At this point, generator expressions are still not part of the SOURCES property when it is read.
| * cmTarget: Remove AddSourceFile methodStephen Kelly2014-03-311-11/+5
| | | | | | | | It is no longer used.
| * cmTarget: Add a method to obtain list of filenames for sources.Stephen Kelly2014-03-311-0/+14
| |
| * cmTarget: Rename AddSource method for backward compatibility.Stephen Kelly2014-03-311-2/+7
| | | | | | | | Add a new AddSource method for future use.
| * cmTarget: Use GetSourceFiles for languages.Stephen Kelly2014-03-311-1/+3
| |
* | Merge topic 'fix_policy_diagnostics'Brad King2014-04-011-3/+3
|\ \ | |/ |/| | | | | 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/+3
| |
* | cmTarget: Port <CONFIG>_LOCATION support to updated string APIsStephen Kelly2014-03-171-2/+2
| |
* | Merge branch 'master' into CONFIG-LOCATION-CMP0026Brad King2014-03-171-534/+717
|\ \ | |/ |/|
| * Merge topic 'fix-CMP0046-warning'Brad King2014-03-131-4/+3
| |\ | | | | | | | | | | | | d83245a3 cmTarget: Don't create duplicate backtraces in CMP0046 warning
| * | 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
| * | | 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
| | | | |