Commit Graph

10567 Commits

Author SHA1 Message Date
Brad King 6f5f87966b Merge topic 'fc-ep-git-update-strategy'
8aa4d51ec5 ExternalProject: Add missing release note for git update strategy
1236590507 FetchContent: Pass through CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY if set
e71c2807ba ExternalProject: Remote checkout needs to include the remote name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4818
2020-06-01 07:49:14 -04:00
Craig Scott 1236590507 FetchContent: Pass through CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY if set
This was missed when the initial support was added in
commit 0aea435aa1 (ExternalProject: Provide choice of
git update strategies, 2020-02-12)
2020-05-29 12:10:32 -04:00
Craig Scott e71c2807ba ExternalProject: Remote checkout needs to include the remote name
Commit 0aea435aa1 (ExternalProject: Provide choice of
git update strategies, 2020-02-12) added the git update
strategies, but the CHECKOUT strategy was not handling
remote refs correctly. The local ref would be checked out
instead and no warning or error would have been emitted.
The test that should have caught this was also malformed
and did not actually move the local master branch as intended.
2020-05-29 12:10:32 -04:00
Raul Tambre 650c1029a0 CUDA: Detect non-working user-specified architectures on NVCC
Extend the improved error message added for Clang by commit 19cc5bc296
(CUDA: Throw error if user-specified architectures don't work,
2020-05-26) to cover NVCC as well.

Also fix the error incorrectly being thrown if the user-specified list
differed in order to the architectures parsed from the compiler output.

Implements: #20757
2020-05-29 11:55:47 -04:00
Brad King b8fe888c12 Merge topic 'FindSubversion-xcode-removed'
2c0db404d1 FindSubversion: Do not accept macOS stub without Xcode implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4813
2020-05-29 07:11:58 -04:00
Brad King 2c0db404d1 FindSubversion: Do not accept macOS stub without Xcode implementation
Xcode no longer provides a `svn` implementation, but the `/usr/bin/svn`
stub may still exist.
2020-05-28 11:37:47 -04:00
Brad King 54eeccbfb6 Merge topic 'openssl-3.0.0' into release-3.17
61d746e592 FindOpenSSL: Detect OpenSSL 3.0.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4805
2020-05-28 06:51:52 -04:00
Brad King 40748ec1d9 Merge topic 'openssl-3.0.0'
61d746e592 FindOpenSSL: Detect OpenSSL 3.0.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4805
2020-05-28 06:51:52 -04:00
Brad King a1af643291 Merge topic 'fix-cpack-deb-generating-empty-paragraph'
6ba842163c CPack-deb: don't add a line with a dot to pkg desc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4806
2020-05-28 06:50:40 -04:00
Jonathan Verner 6ba842163c CPack-deb: don't add a line with a dot to pkg desc
Currently, if the package description ends with a newline
(typically if it is read from a file) cpack -deb adds a single line
with a dot at the end which leads to a violation of the
`extended-description-contains-empty-paragraph` debian policy.

This commit fixes the above behaviour.

Fixes: #20763
2020-05-27 14:44:28 -04:00
Brad King 6b208d873e Merge topic 'cuda_user_architectures'
19cc5bc296 CUDA: Throw error if user-specified architectures don't work

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4800
2020-05-27 14:30:32 -04:00
Vitezslav Cizek 61d746e592 FindOpenSSL: Detect OpenSSL 3.0.0
The OpenSSL versioning is changing with the upcoming 3.0.0 release.
https://www.openssl.org/blog/blog/2018/11/28/version/
Since 3.0.0, the patch letters are being dropped. The new format is:
MAJOR.MINOR.PATCH

The OPENSSL_VERSION variable can now be directly derived from the new
OPENSSL_VERSION_STR macro.
https://www.openssl.org/docs/manmaster/man3/OPENSSL_VERSION_NUMBER.html
2020-05-27 09:08:10 -04:00
Brad King 08f1ee1f53 Merge topic 'cuda_lib_x64'
f2df6f5446 CUDA: Check for lib/x64 library directory in Internal/CUDAToolkit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4799
2020-05-27 08:22:17 -04:00
Raul Tambre 19cc5bc296 CUDA: Throw error if user-specified architectures don't work
Previously if an user specified CMAKE_CUDA_ARCHITECTURES and they didn't
work we would end up erroring during compiler testing.  Instead check if
the architectures we successfully compiled with are the same as the
user-specified (if any). If they don't match, then throw a more helpful
error than compiler testing would.

Additionally, to make this work correctly I made it try all
user-specified architectures at once instead of each separately.

Implements: #20756
2020-05-26 16:08:52 -04:00
Raul Tambre f2df6f5446 CUDA: Check for lib/x64 library directory in Internal/CUDAToolkit
Fixes #20755.
2020-05-26 19:05:22 +03:00
Brad King eb705b9531 Update links to gitlab.kitware.com repos to add -/
GitLab now uses a `/-/` component between the `group/project` part of
the URL and the `{issues,merge_requests,tree}` part so that it can
support `group/subgroup/project` with arbitrary depth.
2020-05-26 11:38:01 -04:00
Brad King 7c0e5fcf63 Merge topic 'reduce-initial-checks'
1d21dd0f7c enable_language: Assume compiler works if ABI detection compiles
7a01250581 CMakeDetermineCompilerABI: Fold copy error into CMAKE_<LANG>_ABI_COMPILED

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4789
2020-05-26 09:26:10 -04:00
Brad King 2ecb8698b7 Merge topic 'cuda-clang-pthreads'
80d37167fe Find{Threads,MPI}: Add support for CUDA with Clang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !4781
2020-05-26 08:25:23 -04:00
Brad King b6d9c3e459 Merge topic 'xerces-cygwin-library-naming'
b59c127df2 FindXercesC: Find Cygwin libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4783
2020-05-26 08:24:16 -04:00
Craig Scott 800e29ab8f Merge topic 'fetchcontent-externalproject-empty-args'
8dca6bd04b FetchContent: Preserve empty string arguments
cbf2daeed0 ExternalProject: Preserve empty string arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4729
2020-05-25 17:20:48 -04:00
Brad King 1d21dd0f7c enable_language: Assume compiler works if ABI detection compiles
We run a `try_compile` with a tiny test source to check if the compiler
works so that we can fail early if it does not.  When the compiler does
work, we immediately `try_compile` the ABI detection source.  In the
common case that both steps work, we gain no useful information from the
first one and the work was wasted.

Re-order the checks to try the ABI detection first.  If it works then
assume the compiler works and skip the dedicated check.  If the ABI
check fails then proceed with the normal test for a working compiler so
the diagnostic can be shown as before.

Fixes: #18703
2020-05-25 14:39:40 -04:00
Brad King 7a01250581 CMakeDetermineCompilerABI: Fold copy error into CMAKE_<LANG>_ABI_COMPILED 2020-05-25 14:08:19 -04:00
Tobias Ribizel 80d37167fe Find{Threads,MPI}: Add support for CUDA with Clang
Currently CMake passes `-Xcompiler -pthread` flags to CUDA compilers
irrespective of the actual CUDA compiler ID.  This makes sure the
additional `-Xcompiler` flag is only used with nvcc.
2020-05-25 11:17:52 -04:00
Brad King a354b7f21e Merge topic 'CheckLinkerFlag-module'
af96c0f4fa CheckLinkerFlag: Add module to check validity of linker flags
3c4cc77d55 Tests: Extend Fortran compiler information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4777
2020-05-25 10:59:01 -04:00
Marc Chevrier af96c0f4fa CheckLinkerFlag: Add module to check validity of linker flags
Fixes: #15934
2020-05-25 10:57:14 -04:00
Brad King b82bdbf44a Merge topic 'ep-git-update-strategy'
0aea435aa1 ExternalProject: Provide choice of git update strategies
ea410414c5 ExternalProject: factor out gitupdate step to separate file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4239
2020-05-25 10:53:26 -04:00
Brad King 54baf63965 Merge topic 'FindSquish_settingsgroup_removal'
8492ac1363 FindSquish: Remove settingsGroup argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4763
2020-05-25 10:37:11 -04:00
Brad King f7960e5488 Merge topic 'cuda-runtime-cleanup'
bcb44ac2ee CUDA: Simplify Clang implicit host linker settings
23519dd24f CUDA: Fix implicit runtime library filtering on Windows
16bed00712 CUDA: Refactor implicit library filtering
5c7ca6f8a8 CUDA: Move VS CudaRuntime selection to be with rest of CUDA options
4468acb979 CUDA: Factor runtime library lookup into helper method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4776
2020-05-25 10:35:13 -04:00
Roger Leigh b59c127df2 FindXercesC: Find Cygwin libraries 2020-05-23 16:03:53 +01:00
Craig Scott 8dca6bd04b FetchContent: Preserve empty string arguments
Fixes: #20579
2020-05-23 23:42:43 +10:00
Craig Scott cbf2daeed0 ExternalProject: Preserve empty string arguments 2020-05-23 23:41:53 +10:00
Craig Scott 0aea435aa1 ExternalProject: Provide choice of git update strategies
Fixes: #16528

Co-Authored-By: Michael Wake <macwake@gmail.com>
2020-05-23 22:27:38 +10:00
Craig Scott ea410414c5 ExternalProject: factor out gitupdate step to separate file
The refactoring exposed that the original implementation
was referring to an undefined variable src_name, which was
previously only used in error messages. This has been fixed
as part of the refactoring work.

Fixes: #20336
2020-05-23 11:01:59 +10:00
Brad King 62816ff88c Merge topic 'fortran-preprocess-property'
3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
66c4e87282 Ninja: Add helper functions to generate Fortran build
5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule
b0a6161190 Fortran: Add Fortran_PREPROCESS property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4659
2020-05-22 10:35:10 -04:00
Brad King bcb44ac2ee CUDA: Simplify Clang implicit host linker settings
The purpose of `CMAKE_CUDA_HOST_IMPLICIT_LINK_*` is to capture the
extra link libraries and directories that the CUDA compiler passes
when invoking the host linker.  We need this when using NVCC because
CMake drives the host linker directly rather than through NVCC.
However, this is not needed with Clang because:

* Clang does not pass any CUDA libraries automatically.
* We drive linking with the Clang compiler anyway.

Drop the detection logic for Clang because it only gives the normal C++
runtime libraries which we do not need here.
2020-05-22 08:15:38 -04:00
Brad King 23519dd24f CUDA: Fix implicit runtime library filtering on Windows
The CUDA runtime library names may have a `.lib` suffix.
Exclude those too.
2020-05-22 08:15:38 -04:00
Brad King 16bed00712 CUDA: Refactor implicit library filtering
Filter CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES just after it is
computed.  Re-use the same exclusion list for filtering
CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES to avoid duplication.
2020-05-22 08:15:38 -04:00
Brad King a7b3102e00 Merge topic 'support_conda_env'
50879ce412 Conda: Add CONDA_PREFIX as an acceptable system prefix path
cd9c3c000f Tests: Update QtAutogen codeeditor test only include headers needed
d806bd2e8c Tests: Update test suite to run in an Anaconda environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4773
2020-05-22 08:12:24 -04:00
Brad King 0781540a80 Merge topic 'cuda-default-runtime' into release-3.17
e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile
a4ea293153 Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4762
2020-05-22 06:55:37 -04:00
Brad King b54280beb7 Merge topic 'cuda-default-runtime'
d8eee80e30 Merge branch 'backport-cuda-default-runtime' into cuda-default-runtime
e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile
a4ea293153 Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4762
2020-05-22 06:55:37 -04:00
Brad King d8eee80e30 Merge branch 'backport-cuda-default-runtime' into cuda-default-runtime 2020-05-22 06:50:19 -04:00
Peter Hill b0a6161190 Fortran: Add Fortran_PREPROCESS property
Issue: #18870
2020-05-21 11:44:14 -04:00
Brad King d8b3160ce9 Merge topic 'FindPython-debug-library-lookup'
596db17cdd Merge branch 'backport-3.17-FindPython-debug-library-lookup' into FindPython-debug-library-lookup
e7b9f928f7 FindPython: use CMAKE specific variables to look-up debug library
71e6854b22 FindPython: use CMAKE specific variables to look-up debug library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4764
2020-05-21 11:36:09 -04:00
Robert Maynard 50879ce412 Conda: Add CONDA_PREFIX as an acceptable system prefix path 2020-05-21 11:32:36 -04:00
Robert Maynard e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime
selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library
selection flags by default.

To maintain backwards compatibility the default CUDA runtime
library needs to be computed based on what libraries are found
on the initial compiler invocation. For example a toolchain
could establish initial flags that have all CUDA compilations
using the runtime version, and if we don't detect this we will
try to link to both the static and shared runtime.

Co-Author: Brad King <brad.king@kitware.com>
Fixes: #20708
2020-05-21 11:15:03 -04:00
Craig Scott ddcc5a350c Merge topic 'doc-CMAKE_SYSTEM_PREFIX_PATH'
6b3d8f281e Document which environment variables effect CMAKE_SYSTEM_PREFIX_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4748
2020-05-20 06:28:11 -04:00
Robert Maynard 6b3d8f281e Document which environment variables effect CMAKE_SYSTEM_PREFIX_PATH 2020-05-19 10:57:09 -04:00
Brad King 2fe2d47b33 Merge topic 'FindHDF5-cleanup'
8fa58aea77 FindHDF5: Clean variables and output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4759
2020-05-19 09:52:22 -04:00
Frederik Gladhorn 8492ac1363 FindSquish: Remove settingsGroup argument
This argument never worked and was not passed on Windows, which is why
the Windows version needs fewer fixups (and used to work independent of
this change).
On Linux (and macOS) it was passed and prevented the server from starting and the
test would not be able to run.

See also comments on https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4648
2020-05-19 11:47:19 +02:00
Seth R Johnson 8fa58aea77 FindHDF5: Clean variables and output
The module's functionality is preserved.  Perform cleanups:

- Format some functions
- Change macros to functions
- Fix return value check from execute_process
- Hide status messages unless HDF5_FIND_DEBUG is enabled
- Normalize TRUE/FALSE capitalization

Fixes: #20718
2020-05-18 12:40:01 -04:00