Commit Graph

7093 Commits

Author SHA1 Message Date
Brad King
072a95350c Merge topic 'ninja-multi-cross-configs'
b7a2baf38c Ninja Multi-Config: Add variable to control configs used in cross-config build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4269
2020-01-24 15:02:20 -05:00
Brad King
786b56942b Merge topic 'vs-dotnet-standard-core'
ae1e1909a1 VS: Add support for .NET Standard and .NET Core

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4240
2020-01-24 10:55:26 -05:00
Brad King
816bbf227f Merge topic 'trace_json_timestamp'
c829f0cfca trace: Add time and stack level to JSON output format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Volo Zyko <volo.zyko@gmail.com>
Merge-request: !4242
2020-01-24 09:19:55 -05:00
Joerg Bornemann
ae1e1909a1 VS: Add support for .NET Standard and .NET Core
Fixes: #20105
2020-01-24 09:11:05 -05:00
Kyle Edwards
b7a2baf38c Ninja Multi-Config: Add variable to control configs used in cross-config build 2020-01-23 15:47:12 -05:00
Brad King
f0f7ea2bf5 Merge topic 'get-runtime-dependencies-keyword-args'
3573f62a16 Merge branch 'backport-get-runtime-dependencies-keyword-args'
c998c8d560 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
4c8a917a87 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4262
2020-01-23 10:02:45 -05:00
Kyle Edwards
c998c8d560 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
Also list all keywords that were missing values instead of only the
first one.
2020-01-22 14:34:33 -05:00
Kyle Edwards
8337ed0d73 Ninja Multi-Config: Add variable to control aliases in build.ninja 2020-01-22 10:26:21 -05:00
Kyle Edwards
110037369d Refactor: Split Ninja files into impl-<Config>.ninja and build-<Config>.ninja 2020-01-22 10:26:21 -05:00
Frank Winklmeier
c829f0cfca trace: Add time and stack level to JSON output format
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.
2020-01-22 09:58:52 -05:00
Brad King
15c573df41 Merge topic 'mark_as_advanced-without-cache'
3ec82b713e cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache
701a5c60e0 cmake: avoid marking local or unused variables as advanced
af158149e7 FindOpenSSL: do not mark a local variable as advanced
74f659f1f2 FindCurses: only mark CURSES_EXTRA_LIBRARY when it is used
7e2ae4e96d FindOpenGL: only mark declared cache variables as advanced
7cc02a0c29 FindLua: only mark LUA_MATH_LIBRARY as advanced if required
85cd26b8a6 FindBoost: only mark Boost_DIR as advanced if defined
338c7916ba CTest: avoid marking undeclared cache variables as advanced
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4150
2020-01-22 09:50:49 -05:00
Brad King
65a3c68259 Tests: Make CMake.FileDownload invalid host name case more robust
Use a well-defined `.invalid` top-level domain instead of assuming there
is no `.png` top-level domain.  Extend the timeout of this one case to
30 seconds to give DNS lookups a chance to fail instead of timing out.
2020-01-21 09:37:45 -05:00
Ben Boeckel
3ec82b713e cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache
Fixes: #18331
2020-01-20 15:49:29 -05:00
Brad King
941c09616b Merge topic 'multi-ninja-pch'
a55df20499 Multi-Ninja: Add precompile headers support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4201
2020-01-20 11:59:28 -05:00
Brad King
bf3142e253 Merge topic 'fphsa-name-mismatch'
be4d1bdf9a FPHSA: acknowledge the name mismatches in CMake-owned modules
ee4673c1ae FPHSA: detect package name mismatches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Eric Noulard <eric.noulard@gmail.com>
Merge-request: !4123
2020-01-20 11:53:14 -05:00
Brad King
9b9dfacaa5 Merge topic 'acc-fix-in-source-depends-path'
ba3a417dce Tests/CustomCommand: add a test for depending on a `./path`
e23475dc73 Tests/CustomCommand: fix custom command line to actually make its output
db4780d584 cmGeneratorTarget: search for relative paths to the binary directory
ec479f101f cmLocalGenerator: collapse the path after construction
fd0ba705ce add_custom_command: check if a relative path should be an in-source path
fd84f510f8 cmLocalGenerator: simplify the current source dir query

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4195
2020-01-20 11:52:00 -05:00
Cristian Adam
a55df20499 Multi-Ninja: Add precompile headers support
Fixes: #19789
2020-01-17 23:17:35 +01:00
Brad King
a7fca06c46 Merge topic 'out-of-dir-link-list'
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
2020-01-17 09:41:10 -05:00
Brad King
cd6f6b2a9f Merge topic 'cmake-ctest-arguments'
4153d8445b Add CMAKE_CTEST_ARGUMENTS variable to pass command-line arguments to ctest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4168
2020-01-17 09:40:23 -05:00
Brad King
796d66438b Merge topic 'rename-cross-config-variable'
310b58e961 Ninja Multi-Config: Rename variable to be more consistent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4234
2020-01-17 09:39:32 -05:00
Craig Scott
808888aa47 Merge topic 'cpack-custom-dmg-names'
6d6f4b9316 CPack/DragNDrop: Support CPACK_DMG_<component>_FILE_NAME
b53230fbee Tests: Add DragNDrop as a testable CPack generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4227
2020-01-17 08:33:01 -05:00
Ben Boeckel
ba3a417dce Tests/CustomCommand: add a test for depending on a ./path 2020-01-16 13:56:30 -05:00
Ben Boeckel
e23475dc73 Tests/CustomCommand: fix custom command line to actually make its output 2020-01-16 13:56:30 -05:00
Ben Boeckel
ec479f101f cmLocalGenerator: collapse the path after construction
The path may contain `..` or `.` components naïvely, so compute them out
before letting the generator handle them.
2020-01-16 13:56:30 -05:00
Ben Boeckel
fd0ba705ce add_custom_command: check if a relative path should be an in-source path
This still is broken for dependencies on generated paths where they get
generated to the source directory rather than the build directory
however, but there's no way to determine that is the case.

Fixes: #20194
2020-01-16 13:54:26 -05:00
Brad King
f0e67da061 target_link_libraries: Fix out-of-dir linking of a list of targets
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
2020-01-16 13:24:27 -05:00
Andrew Fuller
6d6f4b9316 CPack/DragNDrop: Support CPACK_DMG_<component>_FILE_NAME 2020-01-16 08:04:35 -08:00
Andrew Fuller
b53230fbee Tests: Add DragNDrop as a testable CPack generator 2020-01-16 08:04:35 -08:00
Brad King
2a850232fc Merge topic 'cpack-nsis-test'
b796749ba8 Tests: Fix CPackNSISGenerator test on non-x86 Windows platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4230
2020-01-16 10:40:56 -05:00
Kyle Edwards
310b58e961 Ninja Multi-Config: Rename variable to be more consistent
Also make some tweaks to the documentation.
2020-01-16 10:34:43 -05:00
Brad King
c0ac53b90c Merge topic 'file_download_filename'
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
2020-01-16 10:26:04 -05:00
Robert Goulet
4153d8445b Add CMAKE_CTEST_ARGUMENTS variable to pass command-line arguments to ctest
Fixes: #20172
2020-01-15 15:02:56 -05:00
Brad King
b796749ba8 Tests: Fix CPackNSISGenerator test on non-x86 Windows platforms
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.
2020-01-15 14:33:37 -05:00
Brad King
9f1ce93d92 Merge topic 'add_cuda_toolkit_tests'
6e474364d1 CUDAToolkit: No targets now depend on the CUDA runtime
907bb7df57 CUDAToolkit: Gracefully handle missing SDK components
e500eb80cd CUDAToolkit: add_cuda_link_dependency correctly sets dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4183
2020-01-15 13:40:07 -05:00
Brad King
6e6f5afd03 Merge topic 'unity-lang-filename'
274a6f3699 Unity Build: include language in generated source file name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4223
2020-01-15 13:37:33 -05:00
Brad King
2272d256fb Merge topic 'ctest-timeout-on-pipe'
d1976cd1f2 CTest: Fix timeout when grandchild keeps pipes open
2f5eb1800b Tests: Add RunCMake.CTestTimeout test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4217
2020-01-15 13:35:51 -05:00
Johnny Jazeix
c0da651c09 file(DOWNLOAD): Don't fail if given just a filename to write to
Fixes: #17969
2020-01-15 10:03:35 -05:00
Craig Scott
b56d429324 Tests: Fix CMake.FileDownload test failures not reported
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.
2020-01-15 10:03:35 -05:00
Brad King
3bc73803b4 Tests: Fix CMake.FileDownload test in presence of proxy
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.
2020-01-15 10:03:34 -05:00
Brad King
1352585301 Tests: Extend CMake.FileDownload test internal timeouts
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.
2020-01-15 10:03:19 -05:00
Ben Boeckel
ee4673c1ae FPHSA: detect package name mismatches
The `FPHSA_NAME_MISMATCHED` variable may be set if this is intentional
(but should be cleared after the call to not affect other FPHSA calls).
It may also be passed via the `NAME_MISMATCHED` option for new-signature
FPHSA calls.
2020-01-14 17:25:49 -05:00
Brad King
ba675f1ecc Tests: Enable CMP0022 in ExportImport out-of-dir linking case
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.
2020-01-14 15:27:07 -05:00
Kyle Edwards
93526fd913 Merge topic 'ninja_multi_config_support_cuda'
c7ac13e8ed CUDA: Mult-Config Ninja generator now supports CUDA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4187
2020-01-14 15:11:35 -05:00
Robert Maynard
6e474364d1 CUDAToolkit: No targets now depend on the CUDA runtime
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.
2020-01-14 13:50:37 -05:00
Cristian Adam
274a6f3699 Unity Build: include language in generated source file name
Fixes: #20206
2020-01-14 18:48:08 +01:00
Brad King
d1976cd1f2 CTest: Fix timeout when grandchild keeps pipes open
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
2020-01-14 10:29:05 -05:00
Brad King
2f5eb1800b Tests: Add RunCMake.CTestTimeout test
This test will consolidate CTest timeout-related tests.
2020-01-14 10:28:51 -05:00
Brad King
710371ca2f Merge topic 'tutorial'
a7d25358a0 Tutorial: Add the PRIVATE keyword to target_link_libraries command
cf2afb1065 Tutorial: Remove 'Consumer' example
77b515f3eb Tutorial: Improve "MultiPackage" example
3a510a47b0 Tutorial: Add links to relevant CMake documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4113
2020-01-14 09:06:40 -05:00
Robert Maynard
c7ac13e8ed CUDA: Mult-Config Ninja generator now supports CUDA 2020-01-13 12:50:37 -05:00
Kyle Edwards
ca9100c5ce Ninja Multi-Config: Improve error handling when not doing cross-config build 2020-01-13 11:58:07 -05:00