summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* ISPC: Generated Headers suffix configurable with a better defaultRobert Maynard2020-12-141-0/+1
| | | | | | | | | The target property `ISPC_HEADER_SUFFIX` and associated global variable now can control the suffix used when generating the C/C++ interoperability ISPC headers. In addition the default suffix is now "_ispc.h" which matches the common convention that the ISPC compiler team uses and recommends.
* cmTarget: Do not enforce CMP0111 on imported INTERFACE librariesBrad King2020-11-231-27/+29
| | | | | | | | Fix logic added by commit 359c500a24 (cmTarget: Raise error if imported target location is not set, 2020-08-08, v3.19.0-rc1~273^2) to exclude INTERFACE libraries from the policy. They have no location. Fixes: #21470
* Merge topic 'pch-instantiate-templates'Brad King2020-09-101-0/+1
|\ | | | | | | | | | | | | | | | | | | 8c8f03422e PCH: Template instantiation support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Raul Tambre <raul@tambre.ee> Acked-by: Cristian Adam <cristian.adam@gmail.com> Tested-by: Raul Tambre <raul@tambre.ee> Merge-request: !5168
| * PCH: Template instantiation supportTobias Hieta2020-09-021-0/+1
| | | | | | | | | | | | | | | | Adds PCH_INSTANTIATE_TEMPLATES target property for enabling template instantiation in precompiled headers. Enabled by default. Currently only supported for Clang 11 and newer. Implements #21133.
* | Merge topic 'ispc_improvements'Brad King2020-09-081-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | a020787a9b ISPC: Support generation for multiple instruction sets 5a1750017e ISPC: Add compiler launcher support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5173
| * | ISPC: Support generation for multiple instruction setsRobert Maynard2020-09-041-0/+1
| | |
| * | ISPC: Add compiler launcher supportRobert Maynard2020-09-031-0/+1
| | |
* | | Refactor: Use cmToCStr()Vitaly Stakhovsky2020-09-031-1/+1
|/ /
* | Merge topic 'getdef'Brad King2020-09-031-8/+8
|\ \ | | | | | | | | | | | | | | | | | | 11425041f0 cmMakefile::GetDefinition: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5179
| * | cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-8/+8
| | |
* | | Fortran: Initialize Fortran_VISIBILITY_PRESET property from variableThomas G2020-09-021-0/+1
|/ / | | | | | | | | The `CMAKE_Fortran_VISIBILITY_PRESET` variable is documented to initialize the property. Fix it.
* | Merge topic 'xcode-link-phase-all'Craig Scott2020-09-011-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 525464ed2a Xcode: Use "Link Binary With Libraries" build phase in some cases dc0898205c Xcode: Add special case for file type extension map for .xcassets 7b3d8411a2 Xcode: Refactor build setting append code and attribute getter naming Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5036
| * | Xcode: Use "Link Binary With Libraries" build phase in some casesGusts Kaksis2020-08-311-0/+1
| |/ | | | | | | | | | | | | OBJECT and STATIC libraries (framework or non-framework) do not use this build phase. Not all items to be linked use this build phase either. Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* | Merge topic 'ispc_lang_support'Brad King2020-09-011-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image 8976817d6d ISPC: Update help documentation to include ISPC 2368f46ba4 ISPC: Support building with the MSVC toolchain e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds 34cc6acc81 Add ISPC compiler support to CMake 419d70d490 Refactor some swift only logic to be re-used by other languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5065
| * ISPC: Support ISPC header generation byproducts and parallel buildsRobert Maynard2020-08-281-0/+1
| |
* | cmTarget: Raise error if imported target location is not setRaul Tambre2020-08-211-0/+31
| | | | | | | | | | | | | | | | Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This would then end up on the link line and cause build failures. Policy CMP0110 is added to control this behaviour. Fixes #19080, #19943.
* | Add option to optimize link dependencies for static librariesKyle Edwards2020-08-121-0/+1
| | | | | | | | | | | | | | | | | | Add an `OPTIMIZE_DEPENDENCIES` target property and supporting `CMAKE_OPTIMIZE_DEPENDENCIES` variable to optionally enable pruning and flattening of outgoing dependencies from static libraries. Since they do not actually link, they only depend on side effects of their dependencies. Therefore we can drop dependencies that contribute no side effects.
* | Add INTERFACE libraries to generated buildsystem if they have SOURCESBrad King2020-08-071-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTERFACE libraries were created with the intention of collecting usage requirements for use by other targets via `target_link_libraries`. Therefore they were not allowed to have SOURCES and were not included in the generated buildsystem. In practice, this has become limiting: * Header-only libraries do have sources, they just do not compile. Developers should be able to edit those sources (the header files) in their IDE. * Header-only libraries may need to generate some of their header files via custom commands. Some projects work around these limitations by pairing each interface library with an `add_custom_target` that makes the header files and custom commands appear in the generated buildsystem and in IDEs. Lift such limitations by allowing INTERFACE libraries to have SOURCES. For those with sources, add a corresponding build target to the generated buildsystem. Fixes: #19145
* | Remove filtering of allowed INTERFACE library propertiesBrad King2020-08-031-10/+0
|/ | | | | | | | | | | Previously we disallowed use of arbitrary properties on INTERFACE libraries. The goal was to future-proof projects using them by not allowing properties to be set that may affect their future inclusion in the generated buildsystem. In order to prepare to actually include INTERFACE libraries in the generated buildsystem, drop the filter and allow arbitrary properties to be set. Issue: #19145
* cmTarget: Refactor init of common language propertiesRobert Maynard2020-07-281-25/+17
|
* Factor out generator checks for filtering on non-compiling targetsBrad King2020-07-231-7/+24
| | | | | Add a `cmGeneratorTarget::CanCompileSources` helper method to tell generators whether a target might compile anything.
* cmTarget: Skip output dir property init for CMake-provided targetsBrad King2020-07-231-1/+2
|
* cmTarget: De-duplicate conditions for property initializationBrad King2020-07-231-17/+9
|
* cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-2/+1
|
* fileapi: Support multiple backtraces for language standardJustin Goshi2020-07-061-5/+10
|
* cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-2/+2
|
* Merge topic 'fileApiAddLanguageStandardBacktrace'Brad King2020-06-291-0/+69
|\ | | | | | | | | | | | | | | | | 7d6861f367 fileapi: Extend codemodel targets with language standard ba835874a4 Add backtrace support for language standard e43486a639 cmGeneratorTarget: Clarify name of language property lookup helper Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4798
| * Add backtrace support for language standardJustin Goshi2020-06-221-0/+69
| |
* | Refactor: Add IsAndroidGuiExecutable() method to cmTargetKyle Edwards2020-06-181-2/+8
|/
* VS: Enable DOTNET_TARGET_FRAMEWORK properties all target typesKinan Mahdi2020-06-051-1/+1
| | | | | | | | This makes them compatible with `VS_PACKAGE_REFERENCES` and, in particular, fixes nuget package references in combination with install targets. Fixes: #20764
* Merge topic 'fortran-preprocess-property'Brad King2020-05-221-0/+1
|\ | | | | | | | | | | | | | | | | | | 3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF 66c4e87282 Ninja: Add helper functions to generate Fortran build 5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule b0a6161190 Fortran: Add Fortran_PREPROCESS property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4659
| * Fortran: Add Fortran_PREPROCESS propertyPeter Hill2020-05-211-0/+1
| | | | | | | | Issue: #18870
* | cmTarget: Replace "perConfig" constructor boolean with enumBrad King2020-05-181-2/+2
| |
* | Unity Builds: Support explicit specification of sources to groupsRobert Maynard2020-05-071-0/+1
|/ | | | | Instead of having CMake determine which files should go into each unity file, the user can now use explicitly state the mapping.
* GetSafeProperty: return std::string const&Vitaly Stakhovsky2020-04-301-4/+6
|
* Merge topic 'cuda_architectures'Brad King2020-04-161-0/+1
|\ | | | | | | | | | | | | | | | | | | 21131ca60c CUDA: Add CudaOnly.CompileFlags test f0931b0790 CUDA: Convert tests to use CUDA_ARCHITECTURES e98588aaba CUDA: Add CUDA_ARCHITECTURES target property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Patrick Stotko <stotko@cs.uni-bonn.de> Merge-request: !4568
| * CUDA: Add CUDA_ARCHITECTURES target propertyRaul Tambre2020-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Simplifies CUDA target architecture handling. Required for Clang support as Clang doesn't automatically select a supported architecture. We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it. Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC. Implements #17963.
* | Merge topic 'ibmi-aix-exports'Brad King2020-04-151-2/+5
|\ \ | |/ |/| | | | | | | | | 420e91c951 AIX: Activate symbol export/import IBM i (OS400) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4611
| * AIX: Activate symbol export/import IBM i (OS400)Brad King2020-04-141-2/+5
| | | | | | | | Fixes: #20582
| * ObjC: Add _COMPILE_LAUNCHER supportCristian Adam2020-01-091-0/+2
| | | | | | | | Fixes: #20178
* | cmTarget::GetProperty: return cmPropVitaly Stakhovsky2020-03-301-66/+60
| |
* | cmStateDirectory::GetProperty: return cmPropVitaly Stakhovsky2020-03-271-1/+4
| |
* | Merge topic 'pch-warn-invalid'Brad King2020-03-271-0/+1
|\ \ | | | | | | | | | | | | | | | | | | 2ce08e5489 PCH: add an option to disable `-Winvalid-pch` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4499
| * | PCH: add an option to disable `-Winvalid-pch`Cristian Adam2020-03-261-0/+1
| | | | | | | | | | | | Fixes: #20295
* | | Merge topic 'cleanup-endls-2'Brad King2020-03-261-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 1e4b5c7d09 Refactor: Avoid `std::endl` where it's not necessary (part 2) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4514
| * | | Refactor: Avoid `std::endl` where it's not necessary (part 2)Alex Turbov2020-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `std::endl` manipulator, except inserting `\n` character, also performs `os.flush()`, which may lead to undesired effects (like disk I/O in the middle of forming data strings). For the `std::stringstream` it also has no meaning. * replace multiple `operator<<` calls on a string literal w/ the only call and the only (bigger) string literal; * replace one character string literal used in `operator<<` w/ a char literal.
* | | | cmState::GetTargetTypeName: return type is *cmPropVitaly Stakhovsky2020-03-191-1/+1
|/ / /
* | | cmTarget: minor code improvementsVitaly Stakhovsky2020-03-171-23/+23
|/ /
* | Merge topic 'property-computer'Brad King2020-03-171-3/+5
|\ \ | | | | | | | | | | | | | | | | | | fad0ee5404 cmTargetPropertyComputer::GetProperty: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4482
| * | cmTargetPropertyComputer::GetProperty: return cmPropVitaly Stakhovsky2020-03-161-3/+5
| | |