summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* cmTarget: Don't update IMPORTED target compilation propertiesStephen Kelly2014-01-041-23/+25
| | | | | | The include_directories() and add_compile_options() commands should not append to the corresponding target property for IMPORTED targets. This is already the case for add_definitions().
* cmTarget: Rename container holding link implementation objects.Stephen Kelly2014-01-041-14/+14
| | | | | Don't erroneously name it for the link implementation. That's something different.
* Merge topic 'rpath-default'Brad King2014-01-021-5/+48
|\ | | | | | | | | d25ad48 OS X: Add CMP0042 to enable MACOSX_RPATH by default
| * OS X: Add CMP0042 to enable MACOSX_RPATH by defaultClinton Stimpson2014-01-021-5/+48
| | | | | | | | | | Also adding documentation for CMAKE_MACOSX_RPATH, and improving documentation for MACOSX_RPATH.
* | cmTarget: Fix typoStephen Kelly2013-12-191-1/+1
| | | | | | | | 'a ALIAS' -> 'an ALIAS'
* | Merge topic 'constify'Brad King2013-12-191-2/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | c62cd3e Constify autogen handling. 035b690 Autogen: Split AutoRcc handling into two methods 2fcafbf cmLocalGenerator: Constify target definitions access a54eedd Constify cmGeneratorTarget access. 9edee62 Constify handling of link targets. ef25ba8 Constify handling of target dependencies.
| * | Constify handling of link targets.Stephen Kelly2013-12-111-1/+2
| | |
| * | Constify handling of target dependencies.Stephen Kelly2013-12-111-1/+2
| |/
* | Don't search for IMPORTED_LOCATION of INTERFACE_LIBRARY (14636)Stephen Kelly2013-12-091-2/+10
|/ | | | | | | | The INTERFACE_LIBRARY type does not have any LOCATION at all, so return early from GetMappedConfig. GetMappedConfig is called from two locations, one of which already pre-checks the INTERFACE_LIBRARY case. Remove that pre-check and handle that case inside the method instead.
* Merge topic 'INTERFACE_AUTOUIC_OPTIONS'Brad King2013-12-091-139/+153
|\ | | | | | | | | | | 77f3772 cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies. 2e60b5f cmTarget: Report origin of COMPATIBLE_INTERFACE properties.
| * cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.Stephen Kelly2013-12-081-143/+26
| | | | | | | | | | | | | | | | | | Revert the origin-tracking infrastructure from commit 98093c45 (QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property., 2013-11-20). Use the compatibility-tracking for compatible strings instead. If two different dependencies require different AUTOUIC_OPTIONS, cmake will now appropriately issue an error.
| * cmTarget: Report origin of COMPATIBLE_INTERFACE properties.Stephen Kelly2013-12-081-3/+134
| |
* | Don't generate self-references for system include directories.Stephen Kelly2013-12-031-1/+1
|/ | | | | | | Targets which link directly to themselves should not result in generate-time errors (reported by the DAG checker). Self-links are handled separately with policy CMP0038.
* QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.Stephen Kelly2013-11-271-0/+144
| | | | | | | | | | | | | | | | | | | | Transitively consume the property from linked dependents. Implement configuration-specific support by following the pattern set out for compile definitions and includes in cmQtAutoGenerators. Implement support for origin-tracking with CMAKE_DEBUG_TARGET_PROPERTIES. This is motivated by the needs of KDE, which provides a separate translation system based on gettext instead of the Qt linguist translation system. The Qt uic tool provides command line options for configuring the method used to translate text, and to add an include directive to the generated file to provide the method. http://thread.gmane.org/gmane.comp.kde.devel.frameworks/7930/focus=7992 Implement the interface to provide the uic options as a usage-requirement on the KI18n target, as designed for KDE.
* Merge topic 'ninja-compile-link-pool'Brad King2013-11-261-0/+3
|\ | | | | | | | | 7605e37 Ninja: job pool support for compiling and linking
| * Ninja: job pool support for compiling and linkingPeter Kümmel2013-11-251-0/+3
| | | | | | | | | | Could be tested by setting the environment variable NINJA_STATUS=[%r]
* | cmTarget: Add whitelist of properties on INTERFACE_LIBRARY.Stephen Kelly2013-11-251-0/+70
| |
* | INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-56/+77
|/ | | | | | | | | | | | | 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.
* Merge topic 'add-cmHasLiteralPrefix'Brad King2013-11-221-7/+7
|\ | | | | | | | | | | 4fe963f Use new cmHasLiteralPrefix function 7d4b2b2 cmStandardIncludes: Add new cmHasLiteralPrefix function.
| * Use new cmHasLiteralPrefix functionStephen Kelly2013-11-211-7/+7
| |
* | cmTarget: Trivially make more API const.Stephen Kelly2013-11-191-11/+11
| |
* | cmTarget: Make GetExportMacro const.Stephen Kelly2013-11-191-1/+1
| | | | | | | | The std::string member is only used for memory management.
* | cmTarget: Make NameResolvesToFramework const.Stephen Kelly2013-11-191-2/+2
| |
* | cmTarget: Make GetInterfaceLinkLibraries const.Stephen Kelly2013-11-191-1/+1
| |
* | cmTarget: Make GetTargetSourceFileFlags const.Stephen Kelly2013-11-191-4/+4
|/
* Merge topic 'constify'Brad King2013-11-121-15/+14
|\ | | | | | | | | | | | | dcac9be Make accessors for compile-related information const. 19a8a3c cmTarget: Don't finalize include directories in GetIncludeDirectories. 3305364 cmGlobalGenerator: Rename the FinalizeCompileDefinitions method.
| * Make accessors for compile-related information const.Stephen Kelly2013-11-091-13/+14
| | | | | | | | These can be moved to cmGeneratorTarget in CMake 4.0.
| * cmTarget: Don't finalize include directories in GetIncludeDirectories.Stephen Kelly2013-11-071-2/+0
| | | | | | | | Rely on that having been done by the cmGlobalGenerator.
* | Disallow link-to-self (#13947).Stephen Kelly2013-11-071-7/+38
|/
* Merge topic 'policy-CMP0022-fixes-for-master'Brad King2013-11-041-140/+112
|\ | | | | | | | | | | | | | | | | | | | | | | b51696f CMP0022: Update target_link_libraries plain signature documentation 25b7f87 Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master 0a561a0 CMP0022: Warn about a given target at most once 23d21b7 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets ef10b87 CMP0022: Plain target_link_libraries must populate link interface 0e06788 CMP0022: Add test for target_link_libraries plain signature c0f4a61 CMP0022: Add unit test for null pointer check and message. 4b0cfa7 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes
| * Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-masterBrad King2013-11-031-140/+112
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve conflict in Source/cmTarget.cxx by integrating the changes to the internal copy constructor from both sides. Also resolve a logical conflict by dropping the special case for INTERFACE_LIBRARY targets. Since cmTarget::SetMakefile already forces CMP0022 to NEW for such targets we need no special handling. Resolve conflict in Source/cmTargetLinkLibrariesCommand.h by dropping the documentation change. We will make the same change in the new location of the same documentation in a separate commit. Resolve conflicts in Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt Tests/RunCMake/CMP0022/RunCMakeTest.cmake by taking the side from the 'policy-CMP0022-fixes' branch.
| | * CMP0022: Warn about a given target at most onceBrad King2013-11-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since cmTarget::ComputeLinkInterface is called separately for each "head" target that links a target, the warning we produce when CMP0022 is not set could be repeated. Add explicit logic to allow the warning to appear at most once. Multiple copies of the warning for the same target are almost always identical and therefore redundant. In the rare case that two copies of the warning are different, the second can appear in a future run after the first is fixed.
| | * CMP0022: Plain target_link_libraries must populate link interfaceBrad King2013-11-021-135/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMP0022 NEW behavior is that the INTERFACE_LINK_LIBRARIES property exactly defines the link interface. The plain target_link_libraries signature says linking is transitive by default, so it should populate the property. Teach the target_link_libraries plain signature to populate the INTERFACE_LINK_LIBRARIES regardless of the CMP0022 setting. Refactor the cmTarget::ComputeLinkInterface checks that warn when the policy is not set to compare the new property to either the explicitly set old link interface properties or the link implementation fallback for all linkable target types, not just static libraries. This fixes a regression in 2.8.12.0 that caused target_link_libraries to not implement transitive linking in the plain signature once the policy CMP0022 is set to NEW.
| | * Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixesBrad King2013-11-021-1/+26
| | |\
* | | | cmTarget: Make some accessors const.Stephen Kelly2013-11-031-7/+7
|/ / /
* | | Merge topic 'constify'Brad King2013-11-011-99/+112
|\ \ \ | | | | | | | | | | | | | | | | | | | | c4373b3 cmTarget: Make GetProperty() const. cfb6661 Don't call SetProperty from GetProperty.
| * | | cmTarget: Make GetProperty() const.Stephen Kelly2013-10-311-95/+102
| | | | | | | | | | | | | | | | | | | | | | | | This has follow-on effects for other methods and classes. Further work on making the use of const cmTarget pointers common can be done, particularly with a view to generate-time methods.
| * | | Don't call SetProperty from GetProperty.Stephen Kelly2013-10-301-4/+10
| | | | | | | | | | | | | | | | Memoize with the internal container directly instead.
* | | | Merge topic 'use-generator-target'Brad King2013-10-311-307/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | 07f5788 Move TraceDependencies to cmGeneratorTarget. fa03777 Do not populate SourceEntries in AddSourceFile.