summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* ISPC: Handle OBJECT sources in different directoriesRobert Maynard2020-12-071-1/+6
|
* Merge topic 'cuda_vs_skip_computation' into release-3.19Brad King2020-10-271-0/+8
|\ | | | | | | | | | | | | | | | | dd77dec18d VS: Don't compute CUDA options unless necessary e9109dec36 Merge branch 'ninja-multi-per-config-sources' into release-3.18 7c0de4175b Merge branch 'cmake-E-cat-binary' into release-3.18 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5422
| * VS: Don't compute CUDA options unless necessaryRaul Tambre2020-10-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following scenario (with 3.18 policies): 1. A CXX target is created. 2. CUDA language is enabled. CMake 3.18 introduced CMP0104, which requires CUDA_ARCHITECTURES to be set. Because the CXX target was created before CUDA was enabled it wouldn't have it set. The Visual Studio generator would however end up computing CUDA compile options for the CXX target, which would result in a fatal error due to the policy violation. There doesn't seem to be a reason to do this for targets that don't actually use the CUDA language, so we can skip and generate the CXX target just fine. Fixes: #21341
* | add_custom_command: Properly recognize if sources depend on configDeniz Bahadir2020-10-221-6/+11
| | | | | | | | Fixes: #21349
* | Merge topic 'macos-arm64'Brad King2020-10-011-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | b6c60f14b6 macOS: Default to arm64 architecture on Apple Silicon hosts 383e81aa60 Tests: Teach RunCMake to ignore Xcode internal objc warnings 8f75912176 Tests: Enable Assembler test case when CMAKE_OSX_ARCHITECTURES has one value Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5291
| * | macOS: Default to arm64 architecture on Apple Silicon hostsBrad King2020-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Detect `arm64` hardware using a method that pierces Rosetta. If `CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to the toolchain to use `arm64` instead of letting the toolchain pick. Fixes: #20989
* | | Merge topic 'refactor-cmprop'Brad King2020-09-291-23/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | c88dde2869 cmGeneratorTarget: internal refactoring Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5289
| * | | cmGeneratorTarget: internal refactoringvvs314152020-09-281-23/+21
| |/ /
* | | cmGeneratorTarget: Include Cache now occurs per language+configRobert Maynard2020-09-251-4/+3
|/ / | | | | | | | | Previously only occurred per config which broke per-language system includes.
* | OBJECT libraries: Properly recognize if sources depend on configurationDeniz Bahadir2020-09-231-5/+13
| | | | | | | | Fixes: #21198
* | cmGeneratorTarget: Better name for internal variableDeniz Bahadir2020-09-221-4/+4
| |
* | Merge topic 'pch-instantiate-templates'Brad King2020-09-101-0/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | cmGeneratorTarget: Avoid missing nullptr checkvvs314152020-09-081-22/+12
| | | | | | | | | | | | | | | | | | | | | Revise logic in `ComputeOutputDir` that was previously missing a check for nullptr before constructing a `std::string`. Fixes: #21165
* | | Merge topic 'ispc_improvements'Brad King2020-09-081-0/+55
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+55
| | | |
* | | | Refactor: Use cmToCStr()Vitaly Stakhovsky2020-09-031-9/+5
|/ / /
* | | cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-17/+17
| | |
* | | Merge topic 'ispc_lang_support'Brad King2020-09-011-28/+94
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+77
| | |
| * | Refactor some swift only logic to be re-used by other languagesRobert Maynard2020-08-071-26/+23
| | | | | | | | | | | | | | | The logic in AddSwiftInterfaceIncludeDirectories is something that other languages will want going forward
* | | WIN32_EXECUTABLE: Add support for generator expressionsKyle Edwards2020-08-211-0/+6
| | |
* | | Add option to optimize link dependencies for static librariesKyle Edwards2020-08-121-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'osx-archs-apple-only'Brad King2020-08-111-0/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 70ce1ad64a PCH: Avoid Apple-specific architecture flags on other platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5118
| * | PCH: Avoid Apple-specific architecture flags on other platformsBrad King2020-08-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f593b354da (PCH: Add support for multi architecture iOS projects, 2020-04-02, v3.18.0-rc1~414^2) the `OSX_ARCHITECTURES` target property (and corresponding `CMAKE_OSX_ARCHITECTURES` variable) affects flags on non-Apple platforms by accident. Add a missing condition to avoid this. Fixes: #21072
* | | Add INTERFACE libraries to generated buildsystem if they have SOURCESBrad King2020-08-071-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+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
* | Source: use cmNonempty()Vitaly Stakhovsky2020-07-281-1/+1
| |
* | cmGeneratorTarget: Skip computing link implementation for custom targetsBrad King2020-07-271-4/+16
| | | | | | | | | | Targets created by `add_custom_target` cannot be used with `target_link_libraries` and so have no link implementation.
* | cmGeneratorTarget: Simplify logic in ComputeLinkInterfaceLibrariesBrad King2020-07-231-5/+10
| | | | | | | | | | Also check the result of `GetLinkImplementationLibrariesInternal` before using it.
* | cmGeneratorTarget: Add missing nullptr checksBrad King2020-07-231-15/+17
| | | | | | | | Check the result of `GetLinkImplementationLibraries` before using it.
* | cmGeneratorTarget: Skip computing languages for custom targetsBrad King2020-07-231-0/+5
| | | | | | | | | | Targets created by `add_custom_target` do not compile any sources and therefore have no languages.
* | Factor out generator checks for filtering on non-compiling targetsBrad King2020-07-231-0/+5
| | | | | | | | | | Add a `cmGeneratorTarget::CanCompileSources` helper method to tell generators whether a target might compile anything.
* | Factor out generator checks for filtering out interface librariesBrad King2020-07-231-1/+22
| | | | | | | | | | | | Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell generators whether a target should participate in the generated build system.
* | cmGeneratorTarget: Remove unnecessary target type check in dependency tracingBrad King2020-07-231-23/+20
| | | | | | | | | | | | | | | | | | | | Since commit 2600e923a6 (Disallow INTERFACE libraries with add_custom_command(TARGET)., 2014-03-19, v3.0.0-rc3~1^2), we do not trace dependencies of INTERFACE libraries that do not participate in the build system. Therefore we can remove a check of the target type from the implementation that had been added by commit 9db9c1fc8b (cmTarget: Don't try to get sources of an INTERFACE_LIBRARY., 2014-02-14, v3.0.0-rc1~20^2).
* | Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* | Merge topic 'swift-link-iface'Brad King2020-07-201-0/+3
|\ \ | |/ | | | | | | | | | | 14a5712447 Swift: Fix regression in linking to interface libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5027
| * Swift: Fix regression in linking to interface librariesBrad King2020-07-171-0/+3
| | | | | | | | | | | | | | | | | | | | Since commit 2026915f8f (Swift: Propagate Swift_MODULE_DIRECTORY as include directory, 2020-02-03, v3.18.0-rc1~547^2) we internally call `GetAllConfigCompileLanguages` on all directly linked targets without checking if they are interface libraries that don't compile at all. That violates an internal assumption and assertion. Fixes: #20977
| * Merge topic 'cuda_clang_toolkit_path' into release-3.18Brad King2020-06-151-0/+23
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ec59fb6c31 CUDA: Determine CUDA toolkit location for NVCC 0a056246a1 CUDA: Pass toolkit path to Clang 9c43972127 FindCUDAToolkit: Avoid unnecessary temporary variable computing binary dir 9eebb5b8b2 FindCUDAToolkit: Remove unnecessary checks around searches 8f01fe7bf1 FindCUDAToolkit: Use list(SORT) to sort in natural order 8c144fe9ad FindCUDAToolkit: Compute CUDAToolkit_INCLUDE_DIR instead of searching 403f8d31e3 FindCUDAToolkit: Add CUDAToolkit_LIBRARY_ROOT 6636693134 FindCUDAToolkit: Re-unify with Internal/CUDAToolkit Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4828
* | \ Merge topic 'cmnonempty'Kyle Edwards2020-07-151-8/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | eaad8072ee cmNonempty: Convenience inlines to check for non-empty string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5017
| * | | cmNonempty: Convenience inlines to check for non-empty stringVitaly Stakhovsky2020-07-141-8/+8
| | | |
* | | | cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-3/+2
|/ / /
* | | Merge topic 'getfeature-prop'Brad King2020-07-141-6/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 18726ad634 GetFeature(): return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5004
| * | | GetFeature(): return cmPropVitaly Stakhovsky2020-07-111-6/+6
| | | |
* | | | cmGeneratorExpressionInterpreter::Evaluate: remove const char* overloadVitaly Stakhovsky2020-07-111-5/+3
|/ / /
* | | fileapi: Support multiple backtraces for language standardJustin Goshi2020-07-061-7/+12
| | |
* | | Merge topic 'refactor-generator-configs'Brad King2020-07-061-6/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 7a969fe21d cmMakefile: Refactor API to better handle empty config values Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4957
| * | | cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-6/+7
| | | |
* | | | cmStandardLevelResolver: Added to handle standard level queriesRobert Maynard2020-07-011-3/+5
|/ / / | | | | | | | | | Refactored out of cmMakefile
* | | Add backtrace support for language standardJustin Goshi2020-06-221-11/+26
| | |