summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Drop builtin property documentationBrad King2013-10-161-1379/+3
| | | | | | Drop all DefineProperty calls for non-chained properties. Drop the documentation from the chained ones. The documentation for all properties is now in Help/prop_*/*.rst files.
* Teach COMPATIBLE_INTERFACE_* checks to use Help .rst documentsBrad King2013-10-161-3/+6
| | | | | | These checks want to know if named target properties are builtin, which is now known by checking the Help/prop_tgt directory. (Previously the check could be confused by a define_property call in the project.)
* Merge topic 'target-LOCATION-policy'Brad King2013-10-151-0/+50
|\ | | | | | | | | e4e5b28 cmTarget: Deprecate the LOCATION target property with a policy.
| * cmTarget: Deprecate the LOCATION target property with a policy.Stephen Kelly2013-10-111-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | The final location and name of a build-target is not determined until generate-time. However, reading the LOCATION property from a target is currently allowed at configure time. Apart from creating possibly-erroneous results, this has an impact on the implementation of cmake itself, and prevents some major cleanups from being made. Disallow reading LOCATION from build-targets with a policy. Port some existing uses of it in CMake itself to use the TARGET_FILE generator expression.
* | Deprecate COMPILE_FLAGS target property.Stephen Kelly2013-10-111-1/+4
|/ | | | | | It is succeeded by COMPILE_OPTIONS, which supports generator expressions, is a list rather than a string, and is properly escaped.
* Merge topic 'INTERFACE_LIBRARY-target-type'Brad King2013-10-081-40/+71
|\ | | | | | | | | | | | | ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets 435c912 export: Add support for INTERFACE_LIBRARY targets fe73226 Add the INTERFACE_LIBRARY target type.
| * export: Add support for INTERFACE_LIBRARY targetsStephen Kelly2013-10-081-1/+2
| |
| * Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-39/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* | Merge topic 'IMPORTED-target-SYSTEM-includes'Brad King2013-10-071-1/+31
|\ \ | | | | | | | | | | | | a63fcbc Always consider includes from IMPORTED targets to be SYSTEM.
| * | Always consider includes from IMPORTED targets to be SYSTEM.Stephen Kelly2013-09-241-1/+31
| |/ | | | | | | | | | | | | Introduce a target property to control this behavior variable to set the default value for the target property. This does not affect try_compile runs.
* | Merge topic 'cleanup-properties'Brad King2013-10-071-1/+1
|\ \ | | | | | | | | | | | | | | | b78bc33 Cleanup some variable documentation names bbfff52 Remove redundant cmake::GetIsPropertyDefined method
| * | Remove redundant cmake::GetIsPropertyDefined methodBrad King2013-09-171-1/+1
| | | | | | | | | | | | We already have cmake::IsPropertyDefined for the same reason.
* | | Merge topic 'minor_cleanup'Brad King2013-10-071-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6931999 VS6: Add some delimiting between error message and content. d1a5f12 cmTarget: Fix typo in comment. 961c0ba Fix comments to match the code. 7cca50c Remove unused include.
| * | | cmTarget: Fix typo in comment.Stephen Kelly2013-09-121-1/+1
| | | | | | | | | | | | | | | | compatiblity -> compatibility
* | | | Merge topic 'authorative-LINK_LIBRARIES'Brad King2013-10-071-18/+46
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | f01dc72 Use one authorative source of the LINK_LIBRARIES property.
| * | | | Use one authorative source of the LINK_LIBRARIES property.Stephen Kelly2013-09-091-18/+46
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We populate and maintain a vector of structs to keep track of backtraces already, so no need to populate the Properties container additionally. For completeness, it is necessary to remove the condition for populating the vector for only valid library names and generator expressions. That condition is now determined when evaluating the generator expressions.
* | | | Merge topic 'MAP_IMPORTED_CONFIG-property-default'Brad King2013-10-071-1/+5
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | fb1294c cmTarget: Add initializer for MAP_IMPORTED_CONFIG_<CONFIG>
| * | | cmTarget: Add initializer for MAP_IMPORTED_CONFIG_<CONFIG>Stephen Kelly2013-08-281-1/+5
| |/ /
* | | Fix CMP0022 warning when no old-style property is setStephen Kelly2013-09-131-1/+1
| |/ |/| | | | | The string could be null at this point.
* | Add differing target property content to policy CMP0022 warningStephen Kelly2013-09-111-1/+7
|/ | | | | List the contents of the INTERFACE_LINK_LIBRARIES and the old-style property.
* Merge topic 'rpath-on-mac'Brad King2013-08-261-3/+7
|\ | | | | | | | | 78cd884 OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
| * OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.Clinton Stimpson2013-08-221-3/+7
| | | | | | | | | | | | With this, projects can enable MACOSX_RPATH by default, but still have a way to install libraries with no install name dirs into locations such as /usr/local/lib by setting INSTALL_NAME_DIR="".
* | Fix OLD behavior of CMP0021.Stephen Kelly2013-08-241-1/+4
| | | | | | | | | | | | | | | | | | Exclude Ninja and Xcode from the CMP0021 test They do not behave the same as the makefile generator with relative paths. Don't overwrite the header file for in-source builds.
* | Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The ALIAS name must match a validity regex. * Executables and libraries may be aliased. * An ALIAS acts immutable. It can not be used as the lhs of target_link_libraries or other commands. * An ALIAS can be used with add_custom_command, add_custom_target, and add_test in the same way regular targets can. * The target of an ALIAS can be retrieved with the ALIASED_TARGET target property. * An ALIAS does not appear in the generated buildsystem. It is kept separate from cmMakefile::Targets for that reason. * A target may have multiple aliases. * An ALIAS target may not itself have an alias. * An IMPORTED target may not have an alias. * An ALIAS may not be exported or imported.
* | cmTarget: Add NAME propertyStephen Kelly2013-07-311-1/+24
| | | | | | | | | | In generator expression contexts, this can be used to determine the name of the head target in the evaluation.
* | Merge topic 'minor-cleanups'Brad King2013-07-291-19/+31
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | b8dc7fa Genex: Disallow LINKER_LANGUAGE only when used on a static library. c8a10ba cmTarget: Fix iface libraries and languages for static libraries. f94bdb3 cmTarget: Remove duplicates when printing traces of tll signatures ff3d5fa Export: Fix typo of LINK_INTERFACE_LIBRARIES. 79a7a81 Docs: Document variables for default visibility values. 6f6391b Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs. d8cb47f Docs: Trim trailing whitespace in generated doc. f10e648 Docs: Document existing target property debugging options. 4f4d69f Qt4Macros: Simplify some variable population. a413a40 Qt4Macros: Remove undefined varible use. b60a29e Qt4Macros: Remove unneeded generate CONDITION. e454cba Docs: Document file(GENERATE) CONDITION as optional.
| * Genex: Disallow LINKER_LANGUAGE only when used on a static library.Stephen Kelly2013-07-261-4/+4
| | | | | | | | | | For shared libraries and executables, the linker_language is indepenedent of the linked libraries.
| * cmTarget: Fix iface libraries and languages for static libraries.Stephen Kelly2013-07-261-1/+16
| |
| * cmTarget: Remove duplicates when printing traces of tll signaturesStephen Kelly2013-07-261-1/+7
| |
| * Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs.Stephen Kelly2013-07-261-14/+5
| |
| * Docs: Trim trailing whitespace in generated doc.Stephen Kelly2013-07-261-1/+1
| |
* | Merge topic 'tid-system-argument'Brad King2013-07-261-1/+1
|\ \ | |/ |/| | | | | 9b9a596 cmTarget: Fix property name typo in docs.
| * cmTarget: Fix property name typo in docs.Stephen Kelly2013-07-251-1/+1
| |
* | target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signatureStephen Kelly2013-07-241-0/+51
| | | | | | | | | | | | | | Add a new signature to help populate INTERFACE_LINK_LIBRARIES and LINK_LIBRARIES cleanly in a single call. Add policy CMP0023 to control whether the keyword signatures can be mixed with uses of the plain signatures on the same target.
* | Merge topic 'framework-interface-includes'Brad King2013-07-241-0/+28
|\ \ | | | | | | | | | | | | f5ca872 Use linked frameworks as a source of include directories.
| * | Use linked frameworks as a source of include directories.Stephen Kelly2013-07-241-0/+28
| | |
* | | Merge topic 'minor-cleanups'Brad King2013-07-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | 8f5b402 Remove TODO to uniq COMPILE_OPTIONS 5fb58b8 Don't add trailing whitespace to error message.
| * | | Don't add trailing whitespace to error message.Stephen Kelly2013-07-181-1/+1
| |/ /
* | | Remove the LINK_LANGUAGE generator expression.Stephen Kelly2013-07-241-14/+11
|/ / | | | | | | | | | | | | | | | | | | | | It accepted an optional argument to test for equality, but no way to get the linker language of a particular target. TARGET_PROPERTY provides this flexibility and STREQUAL provides the necessary API for equality test. Extend the CompileDefinitions test to cover accessing the property of another target.
* | Merge topic 'drop-old-vs-dependency'Brad King2013-07-161-13/+4
|\ \ | | | | | | | | | | | | 4bb6e24 VS,Xcode: Drop incorrect legacy dependency trace (#14291)
| * | VS,Xcode: Drop incorrect legacy dependency trace (#14291)Brad King2013-07-151-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the "vsProjectFile" argument from cmTarget::TraceDependencies. It appears to be the modern equivalent to a hunk added in commit ba68f771 (...added new custom command support, 2003-06-03): + name = libName; + name += ".dsp.cmake"; + srcFilesToProcess.push(name); but was broken by refactoring at some point. The current behavior tries to trace dependencies on a source file named the same as a target, which makes no sense. Furthermore, in code of the form add_executable(foo foo.c) add_custom_command(OUTPUT "${somewhere}/foo" ... DEPENDS foo) the "vsProjectFile" value "foo" matches source "${somewhere}/foo.rule" generated to hold the custom command and causes the command to be added to the "foo" target incorrectly. Simply drop the incorrect source file trace and supporting logic.
* | | Merge topic 'tid-system-argument'Brad King2013-07-161-0/+77
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | 9cf3547 Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property. 1925cff Add a SYSTEM parameter to target_include_directories (#14180) 286f227 Extend the cmTargetPropCommandBase interface property handling. 83498d4 Store system include directories in the cmTarget. f1fcbe3 Add Target API to determine if an include is a system include. 2679a34 Remove unused variable.
| * | Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.Stephen Kelly2013-07-161-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | Unlike other target properties, this does not have a corresponding non-INTERFACE variant. This allows propagation of system attribute on include directories from link dependents.
| * | Store system include directories in the cmTarget.Stephen Kelly2013-07-021-0/+33
| |/ | | | | | | | | | | | | Entries from the cmMakefile are processed and maintained similarly to other include directories. The include_directories(SYSTEM) signature affects all following targets, and all prior targets in the same makefile.
* | Merge topic 'compile-defs-debugging'Brad King2013-07-151-62/+170
|\ \ | | | | | | | | | | | | | | | | | | | | | d7dd010 Add target property debugging for COMPILE_DEFINITIONS 1841215 Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string. afc9243 Add an overload of cmIDEOptions::AddDefines taking a vector of strings. d95651e Overload cmLocalGenerator::AppendDefines to add a list.
| * | Add target property debugging for COMPILE_DEFINITIONSStephen Kelly2013-07-121-63/+169
| | | | | | | | | | | | | | | | | | | | | Use constructs similar to those for COMPILE_OPTIONS. This is a little different because there is a command to remove_definitions(), so we can't populate the equivalent target property until generate-time in cmGlobalGenerator.
| * | Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.Stephen Kelly2013-07-111-3/+5
| |/ | | | | | | Refactor to create AddCompileDefinitions.
* | Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICYStephen Kelly2013-07-111-18/+14
| | | | | | | | | | | | Use preprocessor loops and add a unit test for the appropriate policies. All policies whose value is recorded at target creation time should be part of this list.
* | TLL: Don't populate old link interface if CMP0022 is NEW.Stephen Kelly2013-07-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Always populate the INTERFACE_LINK_LIBRARIES for interface entries. Don't populate the old interface properties matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? if CMP0022 is NEW. Because the INTERFACE_LINK_LIBRARIES property is now populated by the target_link_libraries when operating on a static library, make an equivalent change which populates the property with the same value when the old link_libraries() command is used. This silences the policy warning in that case.
* | Export: Generate INTERFACE_LINK_LIBRARIES property on targets.Stephen Kelly2013-07-081-3/+8
| | | | | | | | | | | | | | | | | | | | This property is generated only for targets which have recorded policy CMP0022 as NEW, and a compatibility mode is added to additionally export the old interfaces in that case too. If the old interfaces are not exported, the generated export files require CMake 2.8.12. Because the unit tests use a version which is not yet called 2.8.12, temporarily require a lower version.