Commit Graph

31728 Commits

Author SHA1 Message Date
Adriaan de Groot d5ae2f9754 FreeBSD: fix up the package name
When using libpkg, the output filename is determined by libpkg
itself, based on information in the manifest: package name and
version, basically. This doesn't necessarily match the name that
CMake has determined via CPACK_TEMPORARY_PACKAGE_FILE_NAME or
CPACK_PACKAGE_FILE_NAME. So reset the CMake-determined list
to match what libpkg will do.
2021-12-21 13:59:27 +01:00
Adriaan de Groot 0ac1ac798e FreeBSD: migrate to newer pkg_create(3) API
The pkg_create_from_manifest() function was never really intended as
stable API, and bapt@ has asked me to stop using it so the public
API can be stabilized.

Port to pkg_create() with its attendant settings struct.
Since we already have a complete manifest file, we can hand
that (including the embedded plist) to pkg_create().

While here, reintroduce pkg_init(), which lived in downstream patches
for a while and then went away again.
2021-12-21 13:59:27 +01:00
Kitware Robot 6afe949658 CMake Nightly Date Stamp 2021-12-21 00:01:13 -05:00
Brad King af9fcbd006 Merge topic 'improve-CMP0028-messages'
ea050286e7 CMP0028: Report the target whose link interface has an offending item
a97c92e46e CMP0028: Report backtrace to link item rather than target creation
0dcbf4ab58 cmGeneratorTarget: Record when imported target link iface libs are done

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6810
2021-12-20 09:32:42 -05:00
Kitware Robot 6b5c836252 CMake Nightly Date Stamp 2021-12-20 00:02:10 -05:00
Kitware Robot 23f5588a7b CMake Nightly Date Stamp 2021-12-19 00:02:40 -05:00
Kitware Robot 1fdff77fa5 CMake Nightly Date Stamp 2021-12-18 00:02:00 -05:00
Brad King 3930c354f8 Merge topic 'vs-csproj-scripts'
aca153b104 VS: Add custom VCEnd labels only in C# projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6808
2021-12-17 08:58:30 -05:00
Brad King 594f81966d Merge topic 'filter-debug-find'
d7b18895bc cmake: Add filtered debug-find options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !6778
2021-12-17 08:56:37 -05:00
John Parent d7b18895bc cmake: Add filtered debug-find options
Add a `--debug-find-pkg=` option to debug find calls for specific
packages.

Add a `--debug-find-var=` option to debug find calls for specific
return variables.

Fixes: #21880
2021-12-17 08:55:21 -05:00
Kitware Robot 393dbe7ea1 CMake Nightly Date Stamp 2021-12-17 00:01:09 -05:00
Brad King ea050286e7 CMP0028: Report the target whose link interface has an offending item
Previously items linked via the link interface of a dependency were
reported in CMP0028 messages as if directly linked by a target.
Clarify the messages to indicate that an offending item is actually
in the link interface of a given target, regardless of its consumer.

Move the check to the end of generation and look through the final set
of link implementations and link interfaces that were used for
generation.  This avoids repeating messages on link interfaces that
have multiple consumers.
2021-12-16 16:43:17 -05:00
Sumit Bhardwaj aca153b104 VS: Add custom VCEnd labels only in C# projects
In commit dff98aa9ca (VS: add missing label in C# project-build events,
2021-12-15) the condition for adding our own `VCEnd` label was based on
the project being managed or not.  Since we support managed C++
projects, switch the condition to be based on whether the project is C#.

Issue: #21440
2021-12-16 15:31:14 -05:00
Brad King a97c92e46e CMP0028: Report backtrace to link item rather than target creation
Now that we have proper backtraces for both `LINK_LIBRARIES` and
`INTERFACE_LINK_LIBRARIES` entries, we can report them in error
messages.
2021-12-16 12:45:27 -05:00
Brad King 0dcbf4ab58 cmGeneratorTarget: Record when imported target link iface libs are done
`GetImportLinkInterface` populates the link interface from properties
of imported targets.  Make it more closely match the link interface
of in-project targets by recording the `LibrariesDone` field.
2021-12-16 10:39:41 -05:00
Brad King d5026daa9e Merge topic 'link-interface-backtrace'
1d709ea2f5 cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIES
a84a62e0a7 cmTarget: Record backtraces for INTERFACE_LINK_LIBRARIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6805
2021-12-16 10:38:56 -05:00
Brad King d71425f989 Merge topic 'vs-csproj-scripts'
dff98aa9ca VS: add missing label in C# project-build events

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6801
2021-12-16 10:36:56 -05:00
Brad King 4663c82f9e Merge topic 'msvc_cuda_propagate_defines_to_ptx'
574b492b47 CUDA: Visual Studio Generator propagates definitions for PTX files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6802
2021-12-16 10:27:21 -05:00
Kitware Robot 2c79dc95a2 CMake Nightly Date Stamp 2021-12-16 00:02:06 -05:00
Steven Boswell dff98aa9ca VS: add missing label in C# project-build events 2021-12-15 11:11:48 -07:00
Brad King 1d709ea2f5 cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIES 2021-12-15 12:29:47 -05:00
Brad King a84a62e0a7 cmTarget: Record backtraces for INTERFACE_LINK_LIBRARIES 2021-12-15 12:29:44 -05:00
Brad King 029c8f5065 Merge topic 'custom-command-main-dependency'
780341f360 cmCustomCommand: Track main dependency explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6800
2021-12-15 08:52:52 -05:00
Kitware Robot 7de214699f CMake Nightly Date Stamp 2021-12-15 00:01:12 -05:00
unknown 574b492b47 CUDA: Visual Studio Generator propagates definitions for PTX files
From CUDA 9.0 to CUDA 11.4 the CUDA Visual Studio integration
defines omitted user defines from PTX generation.

With CUDA 11.5 this has been resolved, so we backport the fix
to allow for consistent behavior when using CMake
2021-12-14 14:55:48 -05:00
NAKAMURA Takumi 780341f360 cmCustomCommand: Track main dependency explicitly
Store the main dependency as the first entry in the dependency list plus
a boolean member indicating its existence.  Note that this slightly
changes existing behavior: the main dependency was previously the last
entry of the dependency list.
2021-12-14 10:48:43 -05:00
Brad King 25a300b76e Merge topic 'fix-list-transform-invalid-index-crashes'
7dd3e99270 cmListCommand: Handle invalid FOR selector ranges

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6786
2021-12-14 09:36:08 -05:00
Kitware Robot 7a408511bd CMake Nightly Date Stamp 2021-12-14 00:02:09 -05:00
Kitware Robot 61ec751d8a CMake Nightly Date Stamp 2021-12-13 00:02:18 -05:00
Kitware Robot cdaabf45f8 CMake Nightly Date Stamp 2021-12-12 00:01:06 -05:00
Kitware Robot 879f77a195 CMake Nightly Date Stamp 2021-12-11 00:01:12 -05:00
Brad King a6fa3fa136 Merge topic 'msbuild-target-inputs-object-depends'
abc6377469 VS: Add OBJECT_DEPENDS as AdditionalDependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6775
2021-12-10 09:15:46 -05:00
Brad King 9f5e0629df Merge topic 'link-iface-usage-reqs-only'
1e49880472 cmGeneratorTarget: Avoid boolean trap in usage requirement lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6796
2021-12-10 09:14:53 -05:00
Kitware Robot 3abd90ac22 CMake Nightly Date Stamp 2021-12-10 00:01:09 -05:00
Brad King 1e49880472 cmGeneratorTarget: Avoid boolean trap in usage requirement lookup
Replace `bool usage_requirements_only` arguments with a proper
enumeration to clarify meaning at call sites.
2021-12-09 11:00:23 -05:00
Brad King 78c20892bf Merge topic 'ctest-add_subdirectory'
7c5a120c38 Tests: Add case covering both ctest subdirectory commands
04deda1d2a CTest: Extract common implementation of add_subdirectory and subdirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6795
2021-12-09 10:39:20 -05:00
Brad King 01e768850a Merge topic 'simplify-backtrace'
61c46c95ae cmListFileContext: Simplify explicit rule-of-five members
d0ceb409ff cmListFileBacktrace: Remove unused "Depth" method
7b677dbb92 cmListFileBacktrace: Remove unused "bottom" entry
56dc22d488 cmMessenger: Make relative path conversion more explicit
c749982c13 cmTargetPropertyComputer: Simplify by restoring use of cmMakefile
3d378541bb cmMessenger: Adopt backtrace printing functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6794
2021-12-09 10:38:27 -05:00
Dietmar Scheidl abc6377469 VS: Add OBJECT_DEPENDS as AdditionalDependencies
Fixes: #22733
2021-12-09 16:22:10 +01:00
Kitware Robot 4c23e0272b CMake Nightly Date Stamp 2021-12-09 00:02:09 -05:00
Nick Muggio 7dd3e99270 cmListCommand: Handle invalid FOR selector ranges
Fixes crashes involving invalid ranges specified in list(TRANSFORM ...
FOR ...) calls.
* Report error when step is not positive
* Report error when start is after stop

Fixes: #22985
2021-12-08 20:54:04 -05:00
friendlyanon 04deda1d2a CTest: Extract common implementation of add_subdirectory and subdirs
The two functions have basically the same functionality in a CTest
context, however the add_subdirectory implementation was missing code
for changing the current working directory similarly to how it was done
for subdirs. This commit extracts the common code and also fixes that
bug.

Issue: #22921
2021-12-08 11:36:43 -05:00
Brad King 61c46c95ae cmListFileContext: Simplify explicit rule-of-five members 2021-12-08 10:31:55 -05:00
Brad King d0ceb409ff cmListFileBacktrace: Remove unused "Depth" method 2021-12-08 10:31:48 -05:00
Brad King 7b677dbb92 cmListFileBacktrace: Remove unused "bottom" entry
All uses of `GetBottom` by clients have been removed, so drop the
method and its supporting infrastructure.
2021-12-08 10:03:48 -05:00
Brad King 56dc22d488 cmMessenger: Make relative path conversion more explicit
Move the decision to convert to call stacks to relative paths out to the
client.  Avoid using `cmState` to make the decision ourselves.
2021-12-08 10:03:48 -05:00
Brad King c749982c13 cmTargetPropertyComputer: Simplify by restoring use of cmMakefile
Logically revert commit 390a7d8647 (cmTargetPropertyComputer: Implement
GetProperty without cmMakefile, 2016-10-13, v3.8.0-rc1~445^2~9).
It relied on using `cmListFileBacktrace` to get a scope in which to
look up policies.

This does remove a backtrace from `LOCATION` property errors at generate
time, but the backtrace we reported before was incorrect.  It pointed at
the addition of a target, not to the reference to the property.
2021-12-08 10:03:48 -05:00
Brad King 3d378541bb cmMessenger: Adopt backtrace printing functions
Move backtrace printing functions from `cmListFileBacktrace` over to
`cmMessenger`, their primary caller.  Thread `cmMessenger` instances
through APIs needed to update other call sites.
2021-12-08 10:03:48 -05:00
Kitware Robot 1cef966475 CMake Nightly Date Stamp 2021-12-08 00:02:13 -05:00
Brad King d6993e593d Merge topic 'makefile-CMAKE_EXPORT_COMPILE_COMMANDS-HIP'
b59f7600c4 HIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6789
2021-12-07 09:54:10 -05:00
Brad King b59f7600c4 HIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIP
Fixes: #22986
2021-12-07 09:34:49 -05:00