summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge topic 'safe_property'Brad King2018-07-031-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 42cc0644d5 Autogen: Use default and remove custom GetSafeProperty functions 127094f2f0 Add GetSafeProperty method to cmTarget, cmGeneratorTarget and cmSourceFile Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2185
| * | Add GetSafeProperty method to cmTarget, cmGeneratorTarget and cmSourceFileSebastian Holtermann2018-07-021-0/+3
| | |
* | | LINK_DEPENDS: add support for property INTERFACE_LINK_DEPENDSMarc Chevrier2018-06-271-0/+4
|/ / | | | | | | Fixes: #17997
* | LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-0/+6
|/ | | | | | | | | | | | | | This family enable to manage link flags Three new properties: * directory property: LINK_OPTIONS * target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS Two new commands * add_link_options(): to populate directory property * target_link_options(): to populate target properties Fixes: #16543
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-5/+5
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* cmGeneratorTarget: Make import library checks config-awareMichael Stürmer2018-04-051-4/+4
|
* cmGeneratorTarget: add GetManagedType() and CheckManagedType() methodsMichael Stürmer2018-04-051-0/+17
|
* cmGeneratorTarget: add HasLanguage() as wrapper for GetLanguages()Michael Stürmer2018-04-051-0/+6
|
* Genex: Fix COMPILE_LANGUAGE in SYSTEM include directoriesBrad King2018-03-121-1/+2
| | | | | | | | | When evaluating `INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`, or evaluating `INTERFACE_INCLUDE_DIRECTORIES` on an imported target, thread the compile language through to the generator expression evaluator so that it can support `$<COMPILE_LANGUAGE:...>`. Fixes: #17811
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-1/+1
|
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-2/+2
|
* Autogen: Clear sources meta data cacheSebastian Holtermann2017-08-101-0/+5
| | | | | | | | | | | | | | | | | Adds cmGeneratorTarget::clearSourcesCache() which clears the cache of precomputed sources lists and object names. The cache gets recomputed on demand. Clearing the cache is necessary in case an OBJECT library gets a source added after a target (ORIGIN) that includes it computed it's external sources cache. This may happen in AUTOMOC when ORIGIN is processed before the OBJECT library which gets a mocs_compilation.cpp file added. Closes #17152 Closes #17139 Closes #17085 Closes #15967
* Diagnose object library self-referenceBrad King2017-07-141-0/+5
| | | | | | | | | | | | | | | | | | | The code add_library(A OBJECT a.c) target_sources(A PRIVATE $<TARGET_OBJECTS:A>) used to crash CMake via infinite recursion while evaluating the generator expression. Then the change in commit v3.9.0-rc1~266^2~1 (cmGeneratorTarget: Replace source classifier implementation, 2017-04-07) avoided the infinite recursion because GetKindedSources now creates a map entry and initializes it once. If it is called again on the same target during that initialization, the partially computed results are returned. This is still wrong but does not crash. Detect and diagnose this case instead. Co-Author: Ben Boeckel <ben.boeckel@kitware.com> Fixes: #16578
* IPO: Consider support for each language separatelyBrad King2017-06-141-2/+3
| | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
* Features: Refactor <LANG>_STANDARD updateBrad King2017-05-011-0/+2
| | | | | | | | | In order to support generator expressions in target COMPILE_FEATURES we apply them at generate time. Move this step to the beginning of generation instead of doing it on demand while collecting flags. This avoids repeating the process unnecessarily, and will then allow `cmLocalGenerator::AddCompilerRequirementFlag` to be used any time during generation.
* Use CM_DISABLE_COPYDaniel Pfeifer2017-04-241-3/+2
|
* cmGeneratorTarget::SourceFileFlags: remove custom copy ctorDaniel Pfeifer2017-04-211-5/+0
|
* Merge topic 'enable_ptx_compilation'Brad King2017-04-211-0/+1
|\ | | | | | | | | | | | | 23691d78 CUDA: Allow sources to be compiled to .ptx files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !725
| * CUDA: Allow sources to be compiled to .ptx filesRobert Maynard2017-04-201-0/+1
| | | | | | | | | | When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT libraries will generate ptx files instead of object files.
* | Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-16/+26
|/ | | | | Named enumeration values are much clearer at call sites and add more type safety.
* cmGeneratorTarget: Add method to get the object file directoryBrad King2017-04-181-0/+4
| | | | | Add a `GetObjectDirectory` method to get the target's object file directory for a specific configuration.
* cmGeneratorTarget: Factor out a GetTargetObjectNames methodBrad King2017-04-181-0/+5
|
* cmGeneratorTarget: Drop default GetLinkerLanguage config argumentBrad King2017-04-171-1/+1
| | | | Update one remaining call site to avoid using the default.
* cmGeneratorTarget: Drop obj libs from GetConfigCommonSourceFilesBrad King2017-04-131-0/+5
| | | | | | | | | | | | Call sites such as those in the VS global generator that are used only to reject per-config sources will now allow per-config object library objects. The corresponding generators have already been taught to deal with per-config object library files. Remaining call sites do not need object library files anyway. This will later allow `$<TARGET_OBJECTS:...>` generator expressions to evaluate to values that vary by configuration (e.g. because each configuration has its own object files).
* cmGeneratorTarget: Add method to collect all sources for all configsBrad King2017-04-131-0/+15
| | | | | | Multi-config generators like VS and Xcode need to loop over all the source files first and then handle per-config information within each one. Teach cmGeneratorTarget to provide such a view.
* Merge topic 'xcode-remove-UseObjectLibraries'Brad King2017-04-131-3/+0
|\ | | | | | | | | | | | | | | | | 229abfc8 cmGeneratorTarget: Drop unused UseObjectLibraries method 63fbf587 Xcode: Inline relevant parts of UseObjectLibraries 1afacebe Xcode: Do not add Object Libraries source group on Xcode >= 5 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !698
| * cmGeneratorTarget: Drop unused UseObjectLibraries methodBrad King2017-04-121-3/+0
| |
* | Merge topic 'include-style'Brad King2017-04-131-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | 1d829c86 Use quotes for non-system includes 26ee9e42 CPack: drop CPack prefix for includes 5afac50f cmConfigure: Ensure separate include block in headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !691
| * Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* | cmGeneratorTarget: Drop unused GetIDLSources methodBrad King2017-04-111-2/+0
|/
* cmGeneratorTarget: Replace source classifier implementationBrad King2017-04-071-20/+41
| | | | | Compute and memoize the list of sources with their kinds for each configuration just once.
* Merge topic '16733-bundle-genex'Brad King2017-03-311-7/+16
|\ | | | | | | | | | | | | | | | | | | | | d1dac1ac Xcode: Execute RunCMake.Framework also for Xcode generator d02709d7 Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressions 013ffe76 cmGeneratorTarget: Call GetFrameworkDirectory in GetFullNameInternal 32e9d0ca cmGeneratorTarget: Use enum to describe bundle directory query level Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Craig Scott <craig.scott@crascit.com> Merge-request: !635
| * Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressionsGregor Jasny2017-03-301-0/+1
| | | | | | | | Closes #16733
| * cmGeneratorTarget: Use enum to describe bundle directory query levelGregor Jasny2017-03-301-7/+15
| |
* | Merge topic 'ipo-policy-CMP0069'Brad King2017-03-311-2/+6
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | dfa8263f Implement interprocedural optimization for GNU compilers 1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled, e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com> Merge-request: !568
| * Implement interprocedural optimization for GNU compilersRuslan Baratov2017-03-301-0/+3
| | | | | | | | | | Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU compilers by activating their link-time-optimization (LTO) flags.
| * Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATIONRuslan Baratov2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.
| * Refactoring: s,GetFeatureAsBool,IsIPOEnabled,Ruslan Baratov2017-03-301-2/+2
| | | | | | | | | | Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION' feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
* | Xcode: Properly handle Bundle Resources with more than one hierarchy levelGregor Jasny2017-03-221-1/+3
|/ | | | Issue: #16680
* Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def` filesBrad King2017-03-211-0/+2
| | | | | | | | | | | The `WINDOWS_EXPORT_ALL_SYMBOLS` target property exports all symbols found in object files explicitly given to the linker. However, the linker may also find additional symbols in dependencies and copy them into the linked binary (e.g. from `msvcrt.lib`). Provide a way to export an explicit list of such symbols by adding a `.def` file as a source file. Fixes: #16473
* Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementationBrad King2017-03-091-0/+1
| | | | | | | Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a `.def` file as a source. Only one of these could be used within a single target before anyway.
* Refactor module definition file selectionBrad King2017-03-091-1/+12
| | | | | | Create a `ModuleDefinitionInfo` structure for each configuration of a target to hold corresponding information about the selected module definition file (`.def` source).
* Refactor module definition source enumerationBrad King2017-03-091-0/+2
| | | | Add a `cmGeneratorTarget::GetModuleDefinitionSources` method.
* VS: Cache the list of xaml and resx headersDmitry Kochkin2017-02-271-0/+4
| | | | Speed up VS project generation with many such headers.
* Apple: Refactor support for using INSTALL_NAME_DIR.Clinton Stimpson2017-02-141-0/+10
|
* cmGeneratorTarget: Add AddIncludeDirectory method (experimental)Sebastian Holtermann2016-12-071-0/+6
|
* Allow imported INTERFACE libraries to specify a link library nameBrad King2016-11-091-0/+4
| | | | | | | | | | | | | | | 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
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-2/+2
|