summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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.
* 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.