summaryrefslogtreecommitdiffstats
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'cmake-empty-cmd-line-arg' into release-3.23Brad King2022-02-171-2/+22
|\ | | | | | | | | | | | | | | f73457ca2e cmake: Ignore any empty "" command line arguments 67f97f5478 Tests: Add RunCMake helper to run cmake with raw execute_process args Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6980
| * cmake: Ignore any empty "" command line argumentsRobert Maynard2022-02-161-2/+22
| | | | | | | | | | | | | | Don't treat empty quote arguments("") as the current working directory but instead ignore them. Fixes #23217
* | Merge topic 'tll-genex-concat' into release-3.23Brad King2022-02-161-102/+138
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | c1e812ad4f target_link_libraries: Improve tolerance of unquoted generator expressions 5571a31648 target_link_libraries: Handle keyword arguments in dedicated code path 42590df9f9 target_link_libraries: Remove likely-broken ancient compatibility check Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6989
| * | target_link_libraries: Improve tolerance of unquoted generator expressionsBrad King2022-02-151-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to commit 1d709ea2f5 (cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIES, 2021-12-15, v3.23.0-rc1~228^2), the value of `INTERFACE_LINK_LIBRARIES` was a single string. If an unquoted generator expression passed to `target_link_libraries` contained `;` and became multiple arguments, they would all accumulate as a single `;`-separated list in the value of `INTERFACE_LINK_LIBRARIES`. Since that commit, each argument to `target_link_libraries` is placed in `INTERFACE_LINK_LIBRARIES` as a separate entry, as has long been the case for `LINK_LIBRARIES`. That behavior change broke projects that were accidentally relying on accumulation in `INTERFACE_LINK_LIBRARIES` to produce complete generator expressions containing `;`. Teach `target_link_libraries` to accumulate consecutive non-keyword arguments into a single entry before placing them in `LINK_LIBRARIES` or `INTERFACE_LINK_LIBRARIES`. For example, treat `a b c` as if they were written as `"a;b;c"`. This restores the previously accidental support for unquoted generator expressions in `INTERFACE_LINK_LIBRARIES`, and also enables it for `LINK_LIBRARIES`. For now, do not drop the `target_link_libraries` documentation that recommends quoting generator expressions. Quoting is still important to populate `LINK_LIBRARIES` in CMake 3.22 and below, and is also good practice to keep generator expressions whole. Fixes: #23203
| * | target_link_libraries: Handle keyword arguments in dedicated code pathBrad King2022-02-151-83/+100
| | |
| * | target_link_libraries: Remove likely-broken ancient compatibility checkBrad King2022-02-151-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit daa6d2bc04 (ENH: updated handling of debug and optimized target link libraries, 2006-11-29, v2.6.0~2471) the ancient `<lib>_LINK_TYPE` compatibility lookup was done using the name of the dependent target for which `target_link_libraries` is called, rather than the name of the library dependency being considered. This code probably does nothing. Remove it.
* | | cmake --build: prioritize --resolve-package-references over presetCarsten Rudolph2022-02-154-12/+13
|/ / | | | | | | Fixes: #23224
* | cmake::GetDebugFindPkgOutput: Use consistent argument nameCraig Scott2022-02-141-1/+1
| | | | | | | | | | | | The argument name used in the class declaration didn't match the one used in the implementation file. The one in the header appears to be a cut-n-paste from GetDebugFindOutput(), but the implementation makes it clear that "pkg" better infers what the argument represents than "var".
* | find_package: Improve --debug-find-pkg= when using a find moduleBrad King2022-02-104-4/+37
| | | | | | | | | | | | | | | | | | Extend the feature added by commit d7b18895bc (cmake: Add filtered debug-find options, 2021-12-07, v3.23.0-rc1~217^2) to enable debug output for `find_*` calls within a find module or cmake package configuration file. Fixes: #23211
* | find_package: Avoid printing debug output header multiple timesBrad King2022-02-101-11/+4
| |
* | find_package: Mention package name in Config mode debug outputBrad King2022-02-101-1/+2
| | | | | | | | | | Otherwise, if there are no paths considered then the output does not specify the name of the package.
* | find_package: Fix find module name in --debug-find outputBrad King2022-02-101-5/+4
| |
* | find_package: Improve formatting of --debug-find outputBrad King2022-02-101-15/+15
| | | | | | | | Also spell out more complete content in the test's expect output.
* | cmFindPackageCommand: Drop ComputeIfDebugModeWanted overloadBrad King2022-02-102-9/+2
| | | | | | | | | | | | The overload for `--debug-find-pkg` has the same signature as the base class method for `--debug-find-var`. To avoid confusion, drop the overload and inline it its only call site.
* | Merge topic 'restore-target-export-includes' into release-3.23Brad King2022-02-106-13/+23
|\ \ | |/ |/| | | | | | | | | | | 83d79636bf install(TARGETS): Restore per-export INCLUDES DESTINATION Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6969
| * install(TARGETS): Restore per-export INCLUDES DESTINATIONEugene Shalygin2022-02-096-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 55e4753bbb (Refactor cmTargetExport removing InterfaceIncludeDirecories, 2021-07-20, v3.22.0-rc1~337^2~1) the storage of `INCLUDES DESTINATION` was moved into each target. However, a target may be installed in multiple exports, and their `INCLUDES DESTINATION` should not be mixed. Convert the IncludeDirectoriesEntries vector to a map and modify access function to store the directories lists with respect to cmExportTarget object. This fixes error when the same target is exported more than once via different exports and each for consequent export its include directories list grows. Add a test for this case. Fixes: #23183
| * Merge topic 'message-flush' into release-3.22Brad King2022-01-281-2/+2
| |\ | | | | | | | | | | | | | | | | | | 634587e322 message: Restore explicit flushing of messages on stderr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6913
| * \ Merge topic 'nmake-rsp-encoding' into release-3.22Brad King2022-01-271-2/+15
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d5ee6d50ee NMake: Use UTF-8 BOM in response files only with MSVC tooling cab631c2e2 NMake: Document response file encoding heuristic in a comment Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6905
| * | | CMake 3.22.2v3.22.2Brad King2022-01-251-1/+1
| | | |
* | | | CMake 3.23.0-rc1v3.23.0-rc1Brad King2022-02-081-1/+1
| | | |
* | | | Merge topic 'dotnet_sdk' into release-3.23Brad King2022-02-085-34/+154
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5cdd774d51 VS: Handle build target correct for .NET SDK style projects with Any CPU 309191052c VS: Set Visual Studio versions read out from solution file f7791698cb VS: Allow setting output directory in .NET SDK style projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6944
| * | | | VS: Handle build target correct for .NET SDK style projects with Any CPUFlorian Schweiger2022-02-074-32/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Extend Visual Studio solution parser for reading build target * Map solution build target to project build target (especially for Any CPU) * Use C++ <optional> template instead of pointer return value for cmSlnData::GetProjectByGUID
| * | | | VS: Set Visual Studio versions read out from solution fileFlorian Schweiger2022-02-072-2/+24
| | | | |
| * | | | VS: Allow setting output directory in .NET SDK style projectsFlorian Schweiger2022-02-071-0/+11
| | | | |
* | | | | Merge topic 'vs-simplify-pch' into release-3.23Brad King2022-02-041-9/+16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dd1e2cc80c VS: Simplify generation of per-source PCH settings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6950
| * | | | | VS: Simplify generation of per-source PCH settingsBrad King2022-02-031-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid looking up the PCH create/use flags just to map them through flag tables back to the `.vcxproj` settings. Instead, simply generate the PCH settings directly for each source file. Since commit 9df1f33c9a (VisualStudio: move PCH rules to projects when possible., 2020-10-15, v3.20.0-rc1~638^2) we already do this for the target-wide PCH settings.
* | | | | | Replace DEVEL_CMAKE_VERSION with literal 3.23 release versionBrad King2022-02-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was accidentally left out of commit 736663deed (Begin 3.23 release versioning, 2022-02-03). The step is documented as part of the release branching process in the CMake Maintainer Guide `Help/dev/maint.rst`.
* | | | | | Begin 3.23 release versioningBrad King2022-02-031-3/+3
|/ / / / /
* | | | | Merge topic 'cmake-ignore-prefix-path'Brad King2022-02-036-38/+114
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 201d8c4298 find_*(): Add CMAKE_IGNORE_PREFIX_PATH variable bd805a51ae Refactor: Keep track of prefixes in cmSearchPath Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6880
| * | | | | find_*(): Add CMAKE_IGNORE_PREFIX_PATH variableKyle Edwards2022-02-026-12/+61
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #20878
| * | | | | Refactor: Keep track of prefixes in cmSearchPathKyle Edwards2022-02-024-27/+54
| | | | | |
* | | | | | Merge topic 'cmake-presets-configure-preset-reachability'Brad King2022-02-032-3/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c18409cdac CMakePresets.json: Ensure configurePreset is reachable from current file Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6937
| * | | | | | CMakePresets.json: Ensure configurePreset is reachable from current fileKyle Edwards2022-02-022-3/+14
| |/ / / / /
* | | | | | CMake Nightly Date StampKitware Robot2022-02-031-1/+1
|/ / / / /
* | | | | Merge topic 'cuda_generic_arch_all'Brad King2022-02-021-8/+16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8f64df0a7c CUDA: Generic all and all-major support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !6816
| * | | | | CUDA: Generic all and all-major supportRaul Tambre2022-02-011-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 14d8a276 (CUDA: Support nvcc 11.5 new -arch=all|all-major flags, 2021-08-17) added all and all-major options to CUDA_ARCHITECTURES. These are fairly generic and likely to see real-world use by distributors. Thus it's desirable to support these also for Clang and older NVCC versions. The supported architectures are dependent on the toolkit version. We determine the toolkit version prior to compiler detection. For NVCC we get the version from the vendor identification output, but for Clang we need to invoke NVCC separately. The architecture information is mostly based on the Wikipedia list with the earliest supported version being CUDA 7.0. This could be documented and expanded in the future to allow projects to query CUDA toolkit version and architecture information. For Clang we additionally constrain based on its support. Additionally the architecture mismatch detection logic is fixed, improved and updated for generic support: * Commit 01428c55 (CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES doesn't work during detection, 2020-08-29) enabled CMAKE_CUDA_COMPILER_ID_REQUIRE_SUCCESS if CMAKE_CUDA_ARCHITECTURES is specified. This results in CMakeDetermineCompilerID.cmake printing the compiler error and our code for presenting the mismatch in a user-friendly way being useless. The custom logic seems preferable so go back to not enabling it. * Commit 14d8a276 (CUDA: Support nvcc 11.5 new -arch=all|all-major flags, 2021-08-17) tried to support CMP0054 but forgot to add x to the interpolated result. Thus the conditions would always evaluate to false. This is fixed as a byproduct of removing NVIDIA specific checks, improving the error message and replacing architectures_mode with a simpler architectures_explicit. Visual Studio support omits testing the flags during detection due to complexities in determining the toolkit version when using it. A long-term proper implementation would be #23161. Implements #22860.
* | | | | | Merge topic 'dotnet_ref_in_sdk'Brad King2022-02-021-0/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5ee3154f65 VS: .Net SDK Style projects can add Reference to dlls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6932
| * | | | | VS: .Net SDK Style projects can add Reference to dllsSumit Bhardwaj2022-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When support for `DOTNET_SDK` was added, only a minimal set of options were built in. Based on user feedback, support for reference to dlls (not just projects) is needed. That support is added here. Fixes: #23166
* | | | | | CMake Nightly Date StampKitware Robot2022-02-021-1/+1
| | | | | |
* | | | | | Merge topic 'refactor-find-package-cmake-ignore-path'Brad King2022-02-014-11/+28
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 11f97d1968 find_package(): Refactor CMAKE_[SYSTEM_]IGNORE_PATH 30e5c1d92b find_package(): Add tests for CMAKE_IGNORE_PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6918
| * | | | | | find_package(): Refactor CMAKE_[SYSTEM_]IGNORE_PATHKyle Edwards2022-01-314-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the old implementation, CMAKE_[SYSTEM_]IGNORE_PATH was handled in cmFindCommon. Move it into cmFindPackageCommand.
* | | | | | | Merge topic 'update-kwsys'Brad King2022-02-011-1/+1
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1e242a95d0 Merge branch 'upstream-KWSys' into update-kwsys 7d9204a7e2 KWSys 2022-01-31 (9fd1660a) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6930
| * | | | | | Merge branch 'upstream-KWSys' into update-kwsysBrad King2022-01-311-1/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | # By KWSys Upstream * upstream-KWSys: KWSys 2022-01-31 (9fd1660a)
* | | | | | CMake Nightly Date StampKitware Robot2022-02-011-1/+1
|/ / / / /
* | | | | Merge topic 'link-interface-direct'Brad King2022-01-3110-115/+375
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f3ad061858 Add usage requirements to update direct link dependencies 193a999cd5 cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage 22d5427aa6 cmGeneratorTarget: Add LookupLinkItem option to consider own target name f3d2eab36a cmGeneratorTarget: Fix link interface caching of partial results d75ab9d066 cmGeneratorTarget: Clarify CMP0022 logic in ComputeLinkInterfaceLibraries f3e9e03fe0 cmGeneratorTarget: Simplify CMP0022 warning check 216aa14997 cmGeneratorTarget: Return early from ExpandLinkItems with no items 1bc98371d1 Tests: Remove unnecessary policy setting from ObjectLibrary test ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6886
| * | | | Add usage requirements to update direct link dependenciesBrad King2022-01-296-26/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Link line construction starts with `LINK_LIBRARIES` and appends dependencies from the transitive closure of `INTERFACE_LINK_LIBRARIES`. Only the entries of `LINK_LIBRARIES` are considered direct link dependencies. In some advanced use cases, particularly involving static libraries and static plugins, usage requirements need to update the list of direct link dependencies. This may mean adding new items, removing existing items, or both. Add target properties to encode these usage requirements: * INTERFACE_LINK_LIBRARIES_DIRECT * INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE Fixes: #22496
| * | | | cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storageBrad King2022-01-292-0/+61
| | | | | | | | | | | | | | | | | | | | These properties will be given meaning by later commits.
| * | | | cmGeneratorTarget: Add LookupLinkItem option to consider own target nameBrad King2022-01-292-7/+14
| | | | |
| * | | | cmGeneratorTarget: Fix link interface caching of partial resultsBrad King2022-01-291-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `GetLinkInterface` and `GetLinkInterfaceLibraries` cache their results to avoid repeating work. In the case that the result does not depend on the "head" target, they re-use results computed from the first call with any "head" target. However, if `GetLinkInterfaceLibraries` is called first, then not all of the link interface is populated. If `GetLinkInterface` is later called, it needs to finish populating the link interface even if a partially completed interface was cached.
| * | | | cmGeneratorTarget: Clarify CMP0022 logic in ComputeLinkInterfaceLibrariesBrad King2022-01-291-56/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up commit 1d709ea2f5 (cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIES, 2021-12-15), which made the logic a bit more complicated due to having backtraces for CMP0022 NEW behavior.