summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Apple: Add support for static frameworksGregor Jasny2017-01-311-1/+2
| | | | Closes: #16432
* Add properties to run the cpplint style checker with the compilerJamie Snape2017-01-231-0/+2
| | | | | | Create a `<LANG>_CPPLINT` target property (initialized by a `CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker command line to be run along with the compiler.
* Add a getter for manually added target dependenciesGregor Jasny2017-01-161-0/+17
| | | | Closes: #16165
* cmTarget: Enforce TYPE being a read-only propertyGregor Jasny2017-01-091-0/+6
|
* Merge topic 'initial_cuda_language_support'Brad King2016-11-291-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4cc601f2 Help: Add release note for CUDA support 7b9131da CUDA: Add tests to verify CUDA compiler works properly. 9cf5b98d CUDA: Prefer environment variables CUDACXX and CUDAHOSTCXX. a5e806b3 CUDA: Add support for CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY d038559e CUDA: Add separable compilation support to the makefile generator. 43ce4414 CUDA: Add separable compilation support to the ninja generator. 4b316097 CUDA: Add support for the CUDA_SEPARABLE_COMPILATION target property ae05fcc6 CUDA: Add LinkLineComputer that computes cuda dlink lines. 115269a8 CUDA: Refactor cmLinkLineComputer to allow for better derived children. 5dec4031 CUDA: Refactor CMakeCUDAInformation to prepare for separable compilation. 5b20d0ab CUDA: C++ compile features now enable cuda c++11 support. 489c52ce CUDA: Use the host compiler for linking CUDA executables and shared libs. bbaf2434 CUDA: add support for specifying an explicit host compiler. a92f8d96 CUDA: Enable header dependency scanning. ec6ce623 CUDA: State that cuda has preprocessor output and can generate assembly. 4f5155f6 CUDA: We now properly perform CUDA compiler identification. ...
| * CUDA: Add support for CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITYRobert Maynard2016-11-141-0/+1
| |
| * CUDA: Add support language levels (98/11)Robert Maynard2016-11-141-0/+3
| |
* | Allow NO_SYSTEM_FROM_IMPORTED on imported INTERFACE librariesBrad King2016-11-211-1/+4
|/ | | | | | | | | Imported INTERFACE libraries can specify include directories via `INTERFACE_INCLUDE_DIRECTORIES` so the default behavior of treating them as system include directories applies. Allow users to turn this off by setting `NO_SYSTEM_FROM_IMPORTED` on such targets. Closes: #16443
* Merge topic 'imported-interface-libname'Brad King2016-11-091-18/+53
|\ | | | | | | | | | | | | | | 09cda9d5 Allow imported INTERFACE libraries to specify a link library name 1d1f1eeb cmTarget: Refactor GetMappedConfig to choose location property up front 479932fa cmTarget: Add comment clarifying interface library special case 925e4270 cmTarget: Clarify comments in GetMappedConfig
| * Allow imported INTERFACE libraries to specify a link library nameBrad King2016-11-091-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an `IMPORTED_LIBNAME[_<CONFIG>]` target property to specify a library name to be placed on the link line in place of an interface library since it has no library file of its own. Restrict use of the property to imported `INTERFACE` libraries. This will be particularly useful for find modules that need to provide imported libraries from system SDKs where the full path to the library file is not known. Now such find modules will be able to provide an imported interface library and set `IMPORTED_LIBNAME` to refer to the SDK library by name. Issue: #15267
| * cmTarget: Refactor GetMappedConfig to choose location property up frontBrad King2016-11-031-5/+7
| | | | | | | | | | Store the `IMPORTED_LOCATION` property name in a variable up front to avoid duplicating the string literal.
| * cmTarget: Add comment clarifying interface library special caseBrad King2016-11-031-0/+2
| |
| * cmTarget: Clarify comments in GetMappedConfigBrad King2016-11-031-3/+3
| | | | | | | | | | Clarify comments explaining the availability of a target location (file on disk) to distinguish this from the existence of the target.
* | Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-8/+10
|/
* Introduce CM_UNORDERED_SETDaniel Pfeifer2016-10-241-11/+2
| | | | | Avoid duplicating switch among std::unordered_set, cmsys::hash_set, and std::set.
* Merge topic 'allow-fallback-config-mapping'Brad King2016-10-211-14/+27
|\ | | | | | | | | | | | | 587ab322 Tests: Add test for MAP_IMPORTED_CONFIG_<CONFIG> empty fallback 149d49ea Teach MAP_IMPORTED_CONFIG_<CONFIG> to support configuration-less import 60d73393 Help: Format MAP_IMPORTED_CONFIG_<CONFIG> documentation
| * Teach MAP_IMPORTED_CONFIG_<CONFIG> to support configuration-less importJens Weggemann2016-10-201-14/+27
| | | | | | | | | | | | | | | | | | If this property has an empty list entry, check for `IMPORTED_LOCATION` instead of `IMPORTED_LOCATION_<CONFIG>`. This allows custom imported targets to have some configurations mapped and others fall back to a default location. Closes: #16280
* | Merge topic 'clang-tidy'Brad King2016-10-201-4/+8
|\ \ | | | | | | | | | | | | | | | effa6c83 fix more issues reported by clang-tidy fb461cac silence selected clang-tidy violations
| * | fix more issues reported by clang-tidyDaniel Pfeifer2016-10-201-4/+8
| |/
* | cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | | | | | | Include it in dependents which have previously relied on it transitively.
* | cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-2/+2
| | | | | | | | Port dependent code to the change.
* | cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-44/+47
|/
* cmTarget: Implement GetProperty in terms of cmState::SnapshotStephen Kelly2016-10-161-3/+10
|
* cmTarget: Group code for checking written properties togetherStephen Kelly2016-10-161-25/+25
|
* cmTarget: Move sanity checks and computed property access to callersStephen Kelly2016-10-161-18/+5
| | | | | | | | | | | | | | | The GetProperty method is now just accessing contained data, meaning it can be implemented in cmState. Remove the cmMakefile context from the signature as a result and remove the overload with the same signature. Add a GetComputedProperty to cmTarget so that templates can be properly instantiated. Otherwise the Commands would need to be able to reach the specializations which are currently in cmTarget.cxx. As a side-effect, the CMP0026 warning now gives a backtrace to the target when issued from a generator expression.
* cmTargetPropertyComputer: Template some methods on the TargetStephen Kelly2016-10-151-0/+128
| | | | Implement the methods for cmTarget in the cmTarget source.
* cm{,Generator}Target: Add global generator accessorsStephen Kelly2016-10-151-0/+5
| | | | | Provide 'static polymorphism' between the types in this aspect so that they can be used indiscriminately in a C++ template.
* cmTargetPropertyComputer: Unify whitelist handling from cmTargetStephen Kelly2016-10-151-21/+9
|
* cmTargetPropertyComputer: Move whitelist check from cmTargetStephen Kelly2016-10-151-31/+3
|
* cmTargetPropertyComputer: Extract into new filesStephen Kelly2016-10-151-245/+1
|
* cmTargetPropertyComputer: Implement GetProperty without cmMakefileStephen Kelly2016-10-151-24/+32
| | | | Only a cmMessenger and a backtrace are needed.
* cmTarget: Extract GetLocation methodStephen Kelly2016-10-151-38/+54
|
* cmTarget: Extract GetSources methodStephen Kelly2016-10-151-83/+92
|
* cmTarget: Extract location computation methodsStephen Kelly2016-10-151-54/+44
|
* cmTarget: Split property computation into separate classStephen Kelly2016-10-151-49/+75
| | | | | Everything related to property computation will be moved here and eventually shared with cmGeneratorTarget.
* cmTarget: Move IMPORTED check to callersStephen Kelly2016-10-151-6/+7
| | | | This way the policy can be checked without depending on cmTarget.
* cmTarget: Move SOURCES property computation before the restStephen Kelly2016-10-151-85/+85
| | | | The SOURCES have to be computed.
* cmTarget: Use static storage for computed propertiesStephen Kelly2016-10-151-12/+21
| | | | Avoid having to populate a mutable container to return a value.
* cmTarget: Remove target name from parameter listStephen Kelly2016-10-071-4/+3
| | | | Use the member state instead.
* cmTarget: Inline MergeLinkLibraries into only callerStephen Kelly2016-10-071-13/+0
|
* cmTarget: Remove useless link library stateStephen Kelly2016-10-071-4/+0
|
* cmTarget: Remove addition of zero when merging link librariesStephen Kelly2016-10-071-1/+0
| | | | The size is always zero when this is called.
* cmTarget: Add assert about link dataStephen Kelly2016-10-071-0/+1
| | | | | | | | MergeLinkLibraries is called only from cmMakefile::AddGlobalLinkInformation which is only called immediately after creating a target.
* Add a BUILD_RPATH target property specifying build-tree RPATH entriesRuslan Baratov2016-10-031-0/+1
| | | | | | Users may need to add custom `RPATH` entries to be able to run binaries from their build tree without setting `LD_LIBRARY_PATH`. Provide a way to do this that does not affect the install-tree `RPATH`.
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Fix XCODE_ATTRIBUTE_..._LOCATION target property lookupBrad King2016-09-221-1/+2
| | | | | | | | | | | | | | | Refactoring in commit v3.5.0-rc1~272^2~16 (cmGeneratorTarget: Add API for property keys, 2015-10-25) changed the Xcode generator implementation of `XCODE_ATTRIBUTE_...` properties to use the target `GetProperty` method on each `XCODE_ATTRIBUTE_...` property listed by `GetPropertyKeys` instead of looping over the property entries directly. This made the lookup of property names of the form `XCODE_ATTRIBUTE_..._LOCATION` accidentally trigger the computed property logic for the undocumented/legacy `<CONFIG>_LOCATION` property. Of course the computed property value is not the same as the value stored in the `XCODE_ATTRIBUTE_..._LOCATION` property. Fix the computed property logic to avoid triggering on `XCODE_ATTRIBUTE_...` attributes. Closes: #16319
* Convert: Remove last uses of HOME enum valueStephen Kelly2016-09-191-2/+2
|
* cmTarget: Remove unused support for partial constructionBrad King2016-09-151-21/+2
| | | | | We no longer need to support partial construction for cmTarget instances of type GLOBAL_TARGET. Require all constructor arguments up front.
* cmTarget: Inline SetType method at only remaining call siteBrad King2016-09-141-9/+6
|
* cmTarget: Construct with basic information up frontBrad King2016-09-141-9/+10
| | | | | Avoid having partially constructed cmTarget instances around, except for the special case of GLOBAL_TARGET construction.