Commit Graph

48561 Commits

Author SHA1 Message Date
Brad King
7fa5ea130b Merge topic 'cuda_clang_toolkit_path' into release-3.18
ec59fb6c31 CUDA: Determine CUDA toolkit location for NVCC
0a056246a1 CUDA: Pass toolkit path to Clang
9c43972127 FindCUDAToolkit: Avoid unnecessary temporary variable computing binary dir
9eebb5b8b2 FindCUDAToolkit: Remove unnecessary checks around searches
8f01fe7bf1 FindCUDAToolkit: Use list(SORT) to sort in natural order
8c144fe9ad FindCUDAToolkit: Compute CUDAToolkit_INCLUDE_DIR instead of searching
403f8d31e3 FindCUDAToolkit: Add CUDAToolkit_LIBRARY_ROOT
6636693134 FindCUDAToolkit: Re-unify with Internal/CUDAToolkit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4828
2020-06-15 09:25:29 -04:00
Brad King
a3881d6313 Merge topic 'cuda_architectures_disable' into release-3.18
877a92e968 CUDA: Add support for disabling CUDA_ARCHITECTURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4886
2020-06-15 09:24:37 -04:00
Raul Tambre
877a92e968 CUDA: Add support for disabling CUDA_ARCHITECTURES
The ability to disable adding architectures completely for packaging purposes
and cases requiring passing the architectures flags explicitly has been
requested.
Support a false value for CUDA_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES
for this purpose.

Implements #20821.
2020-06-15 09:13:32 -04:00
Brad King
9fb67f690b Merge topic 'clang_cxx20' into release-3.18
b365385d66 Clang: Record Clang 6.0+ as fully supporting C++17
5d26efe38f Clang: Add final C++20 flag for Clang 11.0+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4887
2020-06-15 09:01:44 -04:00
Brad King
05546d695e Merge topic 'revert-find_program-exe-no-read' into release-3.18
cc02ced530 find_program: Revert "Find programs that are executable but not readable"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4871
2020-06-15 08:58:06 -04:00
Raul Tambre
b365385d66 Clang: Record Clang 6.0+ as fully supporting C++17 2020-06-13 11:29:55 +03:00
Raul Tambre
5d26efe38f Clang: Add final C++20 flag for Clang 11.0+
-std=c++20 superseded -std=c++2a in upstream Clang commit
24ad121582454e625bdad125c90d9ac0dae948c8.
2020-06-13 11:29:51 +03:00
Raul Tambre
ec59fb6c31 CUDA: Determine CUDA toolkit location for NVCC
Similar to how we already do for Clang. Avoids a lot of redundant work in
FindCUDAToolkit.
2020-06-12 23:13:57 +03:00
Raul Tambre
0a056246a1 CUDA: Pass toolkit path to Clang
Clang isn't very good at finding the installed CUDA toolkit.
The upstream recommendation is that we should pass the toolkit explicitly.

Additionally:
* Avoids Clang having to search for the toolkit on every invocation.
* Allows the user to use a toolkit from a non-standard location by simply
  setting CUDAToolkit_ROOT. The same way as with FindCUDAToolkit.

Clang wants the directory containing the device library and version.txt as the
toolkit path.
We thus pass the newly introduced CUDAToolkit_LIBRARY_ROOT as the toolkit path.

We save CUDAToolkit_ROOT_DIR and CUDAToolkit_LIBRARY_ROOT on Clang to have them
available in try_compile() and avoid unnecessary re-searching or a possibly
different installation being found in FindCUDAToolkit.
This however means that the selected toolkit can't be changed after the initial
language enablement.

We now determine CUDA compiler ID before doing actual detection, as we don't
want to spend time finding the CUDA toolkit for NVIDIA.

Implements #20754.
2020-06-12 21:50:05 +03:00
Raul Tambre
9c43972127 FindCUDAToolkit: Avoid unnecessary temporary variable computing binary dir 2020-06-12 21:49:15 +03:00
Raul Tambre
9eebb5b8b2 FindCUDAToolkit: Remove unnecessary checks around searches
find_*() don't search if the result variable is already set.
Remove the if()s around such cases.
2020-06-12 21:49:15 +03:00
Raul Tambre
8f01fe7bf1 FindCUDAToolkit: Use list(SORT) to sort in natural order
We had a custom loop to sort in the natural order. Since CMake 3.18 this is
supported natively by CMake and simplifies the code significantly.
2020-06-12 21:49:15 +03:00
Raul Tambre
8c144fe9ad FindCUDAToolkit: Compute CUDAToolkit_INCLUDE_DIR instead of searching
We can avoid searching for this since CUDAToolkit_TARGET_DIR always contains
the include/ directory. But add a warning just in case.

Also apply this in CMakeDetermineCUDACompiler for Clang code.
2020-06-12 21:49:15 +03:00
Raul Tambre
403f8d31e3 FindCUDAToolkit: Add CUDAToolkit_LIBRARY_ROOT
On scattered installations version.txt and nvvm are located at this location.
This may be useful to users and will allow us in the future to parse
version.txt instead of invoking nvcc to figure out the CUDA toolkit version.

We also add it to CMakeDetermineCUDACompiler in preparation for future use by
Clang code.
2020-06-12 21:49:15 +03:00
Raul Tambre
6636693134 FindCUDAToolkit: Re-unify with Internal/CUDAToolkit
A portion of FindCUDAToolkit was previously split in commit dc2eae1f
(FindCUDAToolkit: Factor out discovery code into a separate file, 2020-04-22)
out into Internal/CUDAToolkit to allow re-use of the code in
CMakeDetermineCUDACompiler for Clang support.

This has turned out to be a bad solution due to Clang requiring quite a bit of
special handling and special handling for NVCC leaking out from
Internal/CUDAToolkit into the Clang code using it.

Thus it seems better to re-unify this code and duplicate the parts of the code
necessary for Clang where it's required. This will help us get logic correct
for both NVCC and CUDA handling. We can still unify the common parts in the
future once the code has matured.
2020-06-12 21:49:15 +03:00
Brad King
594fda9c23 Merge topic 'gitlab-ci-xcode-testing' into release-3.18
0f4777ab81 ci: don't test BundleGeneratorTest
77b44ed4ba gitlab-ci: add an Xcode tester
d33b38d4aa gitlab-ci: rename some scripts to be Linux-specific

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4883
2020-06-12 12:26:28 -04:00
Ben Boeckel
0f4777ab81 ci: don't test BundleGeneratorTest
This test uses shared global resources and doesn't work well with the CI
infrastructure we have. It is tested by nightly builders however.
2020-06-12 11:23:36 -04:00
Ben Boeckel
77b44ed4ba gitlab-ci: add an Xcode tester 2020-06-12 11:23:36 -04:00
Ben Boeckel
d33b38d4aa gitlab-ci: rename some scripts to be Linux-specific
macOS install trees have a different layout and package names.
2020-06-12 11:23:19 -04:00
Brad King
3145264449 Merge topic 'gitlab-ci-ext-test-sets' into release-3.18
2e7cefec03 gitlab-ci: add a cuda10.2 builder
1a2961b895 Tests: add CUDA labels to tests which are affected by CUDA
2caa7502d5 ci: support running just a set of tests with external builders
26b4cbcf93 gitlab-ci: move Makefiles Linux tests to use the package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4877
2020-06-12 11:02:35 -04:00
Brad King
81ea5eb637 Merge topic 'vs-lang-C' into release-3.18
5c04e77e07 VS: Restore compilation of '.C' sources as C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4880
2020-06-12 10:06:37 -04:00
Brad King
d42011e3cf Merge topic 'gitlab-ci-more-qtdialog' into release-3.18
d7679f6427 QCMakeCacheView: use non-deprecated List and Set constructions
973fc56020 gitlab-ci: test QtDialog on macOS
1a995439e5 ci: add download information for Qt on macOS
881c0b86dd gitlab-ci: test QtDialog on Windows
b8d46d5e50 ci: add a script to download Qt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4874
2020-06-12 10:05:33 -04:00
Ben Boeckel
2e7cefec03 gitlab-ci: add a cuda10.2 builder 2020-06-12 09:13:21 -04:00
Brad King
cc02ced530 find_program: Revert "Find programs that are executable but not readable"
The fix in commit 86e6349ef7 (find_program: Find programs that are
executable but not readable, 2020-04-04, v3.18.0-rc1~372^2) can break
existing projects that were (likely accidentally) relying on the
old behavior to find files that are readable but not executable.
Revert the fix for now.  We can re-introduce it with a policy later.

Instead of reverting the test case, update it to cover the old behavior.
That can serve as a reference for testing the policy when introduced.

Fixes: #20814
Issue: #10468
2020-06-12 05:04:56 -04:00
Brad King
5c04e77e07 VS: Restore compilation of '.C' sources as C++
Refactoring in commit 3b547e2e4b (VS: Simplify logic adding source file
C/C++ language flag to MSVC, 2020-05-15, v3.18.0-rc1~139^2~1) failed to
account for MSVC's treatment of `.C` extensions as C.  Add this special
case to the logic to restore use of `-TP` for `.C` extensions.

Fixes: #20822
2020-06-11 14:15:18 -04:00
Ben Boeckel
1a2961b895 Tests: add CUDA labels to tests which are affected by CUDA 2020-06-11 13:04:33 -04:00
Ben Boeckel
2caa7502d5 ci: support running just a set of tests with external builders 2020-06-11 13:03:38 -04:00
Ben Boeckel
26b4cbcf93 gitlab-ci: move Makefiles Linux tests to use the package 2020-06-11 13:03:38 -04:00
Brad King
01fb8d7993 Merge topic 'nvcc_supports_cuda17' into release-3.18
95700be52d CUDA: Teach CMake that NVCC 11 supports cuda_std_17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4872
2020-06-11 07:45:29 -04:00
Brad King
61ad9d92bd Merge topic 'FindProtobuf-typo' into release-3.18
c1de3d1b34 FindProtobuf: Fix typo in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4873
2020-06-11 07:44:24 -04:00
Ben Boeckel
d7679f6427 QCMakeCacheView: use non-deprecated List and Set constructions 2020-06-10 16:42:56 -04:00
Ben Boeckel
973fc56020 gitlab-ci: test QtDialog on macOS 2020-06-10 16:42:56 -04:00
Ben Boeckel
1a995439e5 ci: add download information for Qt on macOS 2020-06-10 15:57:16 -04:00
Ben Boeckel
881c0b86dd gitlab-ci: test QtDialog on Windows 2020-06-10 15:57:16 -04:00
Ben Boeckel
b8d46d5e50 ci: add a script to download Qt 2020-06-10 15:57:16 -04:00
Ron Klein
c1de3d1b34 FindProtobuf: Fix typo in documentation
typo: "filess" ==> "files"
2020-06-10 15:01:37 -04:00
Robert Maynard
95700be52d CUDA: Teach CMake that NVCC 11 supports cuda_std_17 2020-06-10 13:27:51 -04:00
Craig Scott
abe36194e8 Merge topic 'add-missing-test-args' into release-3.18
131b8cc8ae Help/dev: document other arguments to `Do: test`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4870
2020-06-10 08:42:39 -04:00
Ben Boeckel
131b8cc8ae Help/dev: document other arguments to Do: test 2020-06-09 11:12:05 -04:00
Brad King
596cfd2680 CMake 3.18.0-rc1 v3.18.0-rc1 2020-06-09 10:58:51 -04:00
Brad King
9ceb980981 Merge topic 'cmGeneratorTarget-include-cmProperty' into release-3.18
e65e88fbce cmGeneratorTarget: fix misplaced header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4864
2020-06-09 09:25:54 -04:00
Brad King
577c86e59d Merge topic 'cpack-ifw-3.2' into release-3.18
b79aad8069 CPack/IFW: Add Qt installer framework version 3.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4859
2020-06-09 09:23:08 -04:00
Brad King
5bb24ed550 Merge topic 'FindOpenSSL-3.0' into release-3.18
796b447373 FindOpenSSL: Fix OpenSSL 3.0.0 version extraction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4860
2020-06-09 08:53:05 -04:00
Craig Scott
b5d8e93732 Merge topic 'doc-gitlab-ci' into release-3.18
855ed80111 Help/dev: Update CMake Review Process document for GitLab CI

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4865
2020-06-09 07:59:45 -04:00
Brad King
855ed80111 Help/dev: Update CMake Review Process document for GitLab CI
We have replaced use of `buildbot` with GitLab CI.  Update the
relevant section of our review process documentation.
2020-06-09 07:54:22 -04:00
Craig Scott
bccede34aa Merge topic 'doc-testprop-DEPENDS-REQUIRED_FILES' into release-3.18
6b75175219 Help: Add example for REQUIRED_FILES test property
61139c91d2 Help: Add example for DEPENDS test property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4853
2020-06-09 05:55:24 -04:00
Michael Hirsch
6b75175219 Help: Add example for REQUIRED_FILES test property 2020-06-09 09:20:23 +10:00
Michael Hirsch
61139c91d2 Help: Add example for DEPENDS test property 2020-06-09 09:04:04 +10:00
Brad King
e8e1aefd33 Merge topic 'remove-unused-ci-script' into release-3.18
f8b2d8f178 ci: remove unused sccache download script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4866
2020-06-08 13:08:43 -04:00
Ben Boeckel
f8b2d8f178 ci: remove unused sccache download script 2020-06-08 11:39:02 -04:00