Add the timestamp and stack depth of the function call to the JSON trace
output format. This information can be useful for cmake profiling and
call stack inspection (see e.g. https://github.com/volo-zyko/cmake-profile-stats).
Improve unit test to allow for varying set of keys to check in trace lines.
f0e67da061 target_link_libraries: Fix out-of-dir linking of a list of targets
acee629103 cmTargetLinkLibrariesCommand: Move HandleLibrary to helper struct
ba675f1ecc Tests: Enable CMP0022 in ExportImport out-of-dir linking case
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4226
In a case like
target_link_libraries(targetInOtherDir PUBLIC "$<1:a;b>")
then all entries in the list need to be looked up in the caller's
scope. Previously our `::@(directory-id)` suffix would apply only
to the last entry. Instead surround the entire entry by a pair
`::@(directory-id);...;::@` so that the `::@` syntax can encode
a directory lookup scope change evaluated as the list is processed.
Fixes: #20204
c0da651c09 file(DOWNLOAD): Don't fail if given just a filename to write to
b56d429324 Tests: Fix CMake.FileDownload test failures not reported
3bc73803b4 Tests: Fix CMake.FileDownload test in presence of proxy
1352585301 Tests: Extend CMake.FileDownload test internal timeouts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4159
In commit ebfffc609e (CPack/NSIS: Add option for setting
MUI_HEADERIMAGE_BITMAP, 2020-01-02) this test was added but only globbed
for 32-bit windows packages. Fix the test to glob for packages of any
architecture.
Because the PASS_REGULAR_EXPRESSION test property is set,
the exit code of the test is ignored, so we can't just rely on using
message(SEND_ERROR) or the command itself failing. We have to
add an explicit error message for all unexpected status codes
and check for such messages with a FAIL_REGULAR_EXPRESSION.
We do not actually need to contact any real http servers.
The one attempt we make is to an intentionally bad domain name.
Unset any proxy configuration that may change behavior.
On a busy machine running many tests in parallel the `file(DOWNLOAD)`
step can take longer than 2 seconds even to simply copy a file.
Raise the timeout to 4 seconds to reduce spurious failures.
Since out-of-dir linking is enabled by CMP0079, which is newer than
CMP0022, it is likely that both will be set in practice when out-of-dir
linking is used.
It is not a requirement to have shared|static consistent across your
CUDA libraries (e.g curand, nppc ) and your CUDA runtime library.
It is entirely allowable to use a static nppc and a shared runtime.
When a test's process creates its own child and exits, the grandchild
may keep pipes open. Fix CTest logic to correctly timeout if the
grandchild does not exit and close the pipes before the timeout expires.
This was broken by commit b5e21d7d2e (CTest: Re-implement test process
handling using libuv, 2017-12-10, v3.11.0-rc1~117^2) which added an
unnecessary condition to the timeout handling.
Fixes: #20116
Many users will want to use the Ninja Multi-Config generator like a
traditional Visual Studio-style multi-config generator, which doesn't
mix configurations - custom commands are built using target executables
of the same configuration the command is for. We do not want to force
these people to generate an N*N build matrix when they only need N*1,
especially if they have lots of targets. Add a new variable,
CMAKE_NINJA_CROSS_CONFIG_ENABLE, to opt-in to the cross-config build
matrix.
7ffa42288e Merge branch 'backport-3.15-cuda-device-link-only-cuda'
071c4f1a2a CUDA: Do not device link if target has no CUDA usage
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4191
01c90d76a1 Merge branch 'backport-3.16-cuda-device-link-only-cuda'
7ffa42288e Merge branch 'backport-3.15-cuda-device-link-only-cuda'
071c4f1a2a CUDA: Do not device link if target has no CUDA usage
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4191
In commit a1ad0a699b (target_link_libraries: Allow use with targets in
other directories, 2018-09-07, v3.13.0-rc1~94^2) we added use of `<...>`
to encode a directory id, but the closing `>` can incorrectly terminate
a surrounding generator expression early. Encode the directory id using
`(...)` instead.
Fixes: #20202
When CUDA is enabled, and a pure non-CUDA target has
CMAKE_CUDA_SEPARABLE_COMPILATION enabled, don't actually perform
the device linking step, as it will fail. A target that has
CMAKE_CUDA_SEPARABLE_COMPILATION enabled must also have CUDA
usage (either itself, or something it links to).
Fixes: #20182