Commit Graph

46560 Commits

Author SHA1 Message Date
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
05738b5f21 Merge topic 'pch_job_pool'
97c124e30f Ninja: Add a separate job pool for PCH creation
ebd0b16ddb vim: Add target_precompile_headers command highlighting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !4224
2020-01-16 10:33:48 -05:00
Dan Johnston
97c124e30f Ninja: Add a separate job pool for PCH creation
Add a `JOB_POOL_PRECOMPILE_HEADER` target property to specify the pool
name, and its associated `CMAKE_JOB_POOL_PRECOMPILE_HEADER` variable.

Fixes: #20217
2020-01-16 10:32:25 -05:00
Dan Johnston
ebd0b16ddb vim: Add target_precompile_headers command highlighting 2020-01-16 10:29:26 -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
Sumit Bhardwaj
2e882b4275 CSharp: Set C# compiler to default version
Remove the hard-coded ``/langversion:3`` option and let the compiler
choose the default language version automatically as documented at

    https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version

Fixes: #17674
2020-01-16 09:34:00 -05:00
Kitware Robot
1e728706de CMake Nightly Date Stamp 2020-01-16 00:01:15 -05:00
Tim Blechmann
5da3d01fd1 cmSourceFile: avoid unnnecessary copies
the copies in `cmSourceFile::FindFullPath` are one of the hotspots of
my build system: we can easily avoid them by capturing by reference
instead of by value
2020-01-16 12:22:25 +08:00
Tim Blechmann
9d5a554cc9 cmGlobalGenerator: Add cache for realpath() results
Cache the results of `realpath()` system calls in `cmGlobalGenerator`
to avoid repeating such calls for the same paths over and over.
2020-01-16 11:29:25 +08: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
Neil Carlson
f7f60ddcf9 Fortran: Add support for NAG Fortran submodules
They use a `.sub` extension.

Fixes: #20220
2020-01-15 14:12:22 -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
3b3f2474da Merge topic 'unity-lang-filename' into release-3.16
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
6c23cbca37 Merge branch 'release-3.16' 2020-01-15 13:37:33 -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
c2d1e78603 Merge branch 'release-3.16' 2020-01-15 13:36:36 -05:00
Brad King
f0986f62a8 Merge topic 'python39' into release-3.16
f6474214b3 FindPython: Add support for version 3.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Marc Chevrier <marc.chevrier@gmail.com>
Acked-by: Björn Esser <besser82@fedoraproject.org>
Merge-request: !4225
2020-01-15 13:36:35 -05:00
Brad King
513c7bf515 Merge topic 'python39'
f6474214b3 FindPython: Add support for version 3.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Marc Chevrier <marc.chevrier@gmail.com>
Acked-by: Björn Esser <besser82@fedoraproject.org>
Merge-request: !4225
2020-01-15 13:36:35 -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
Brad King
204c0a65af Merge topic 'cmake-self-rpath'
d92bf9e84f Enable RPATH for CMake's own binaries by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4222
2020-01-15 13:34:35 -05:00
Brad King
601af8f2b4 Merge topic 'avoid-getcwd'
22f38c0d6b cmake: avoid getcwd in `CollapseFullPath`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4218
2020-01-15 13:32:52 -05:00
Brad King
f11b8342a0 Merge topic 'modernize-memory-management'
328f586be7 cmAlgorithms.h: remove obsolete helpers
f466cea3c9 cmMakefile: modernize memory management

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4215
2020-01-15 13:32:00 -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
Kitware Robot
e125d50ddf CMake Nightly Date Stamp 2020-01-15 00:01:17 -05:00
Ben Boeckel
7cc02a0c29 FindLua: only mark LUA_MATH_LIBRARY as advanced if required 2020-01-14 17:45:23 -05:00
Ben Boeckel
85cd26b8a6 FindBoost: only mark Boost_DIR as advanced if defined 2020-01-14 17:45:22 -05:00
Ben Boeckel
338c7916ba CTest: avoid marking undeclared cache variables as advanced 2020-01-14 17:40:29 -05:00
Ben Boeckel
b6c7a10b23 CPack: mark options as advanced only if defined 2020-01-14 17:40:29 -05:00
Ben Boeckel
be4d1bdf9a FPHSA: acknowledge the name mismatches in CMake-owned modules 2020-01-14 17:25:49 -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
Miro Hrončok
f6474214b3 FindPython: Add support for version 3.9
Development versions of Python 3.9.0 are already out there.

See PEP 596 -- Python 3.9 Release Schedule:
https://www.python.org/dev/peps/pep-0596/
2020-01-14 15:02:19 -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
d92bf9e84f Enable RPATH for CMake's own binaries by default
Reconcile the changes made by:

* commit ae62f66033 (ENH: CMake does not need RPATHs at all for its own executables, 2006-03-01, v2.4.0~380)
* commit a056cffc5b (COMP: enable RPATH if any of the CMAKE_USE_SYSTEM_XXX variables is enabled, 2007-08-28, v2.6.0~1183)
* commit c0108d1e07 (COMP: use RPATH is building QtDialog and the Qt libs are not in /lib or /usr/lib, 2007-11-05, v2.6.0~915)

The overall goal of those changes was to get the RPATH set for external
libraries when needed and also to avoid re-linking or other RPATH
editing on installation.  We can use a simpler approach to satisfy both
goals: always use RPATH entries for libraries found externally.  If
there are no such libraries we will get no RPATH.  If there are such
libraries that are not in standard paths we will get a RPATH that points
at them.  This will work for running either from the build tree or the
install tree, so we can use the same for both to avoid editing on
installation.

Fixes: #20185
2020-01-14 12:03:06 -05: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
Brad King
a2a91eb141 Merge topic 'cross-ninja-improve-error-handling'
ca9100c5ce Ninja Multi-Config: Improve error handling when not doing cross-config build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4214
2020-01-14 09:03:09 -05:00
Brad King
e74049b388 Merge topic 'vs-Fortran-link-flags' into release-3.16
a3c827b2ea VS: Add Fortran link flag table entries for /OPT:*

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4210
2020-01-14 09:01:21 -05:00
Brad King
03acdadb8a Merge branch 'release-3.16' 2020-01-14 09:01:21 -05:00
Brad King
c42ade942d Merge topic 'vs-Fortran-link-flags'
a3c827b2ea VS: Add Fortran link flag table entries for /OPT:*

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4210
2020-01-14 09:01:21 -05:00
Brad King
4aa8397a4f Merge topic 'fix-global-autogen-target-help'
3104dc059c Help: Fix variable name on CMAKE_GLOBAL_AUTOGEN_TARGET page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4212
2020-01-14 09:00:21 -05:00
Brad King
47dac86c08 Merge topic 'xcode-default-warnings'
b7b8331d68 Xcode: Drop hard-coded default warning flags like -Wmost

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4213
2020-01-14 08:59:37 -05:00
Brad King
f1af6d5baf Merge topic 'doc-user-interaction'
bd681fee7a Help: Add guides for user interaction
6185265800 Utilities/Sphinx: Index guide-level documents for cross-referencing
b1b7d01172 Utilities/Sphinx: Index document types only by top level directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Mateusz Łoskot <mateusz@loskot.net>
Acked-by: Daan De Meyer <daan.j.demeyer@gmail.com>
Merge-request: !4097
2020-01-14 08:58:38 -05:00