Commit Graph

10655 Commits

Author SHA1 Message Date
Brad King
ba222d9fb0 Merge topic 'GoogleTest-DISCOVERY_MODE-cleanups'
1458b4c048 Help: Add CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE to release notes
642ea49115 GoogleTest: Replace SEND_ERROR with FATAL_ERROR
09c38e8de6 Tests: Don't ask for things not required for GoogleTest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4938
2020-06-26 09:31:20 -04:00
Craig Scott
642ea49115 GoogleTest: Replace SEND_ERROR with FATAL_ERROR
We want to fail and halt immediately upon any error, not continue
past a fatal problem.
2020-06-24 21:57:19 +10:00
evatux
56e645a4c3 Find{BLAS,LAPACK}: Add missing thread library for Intel MKL on Win32
The patch also updates the documentation to explicitly state
that Intel10_32 stands for threaded case (linked with Intel OpenMP).
Later, one may need to add Intel10_32_seq to support linking
with the sequential version of Intel MKL.

Fixes: #20857
2020-06-23 09:16:14 -07:00
Brad King
ba0ff76af3 Merge topic 'VxWorks-platform-id' into release-3.18
b22586be01 VxWorks: Add Platform ID for Modules/CMakePlatformId.h.in

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4922
2020-06-23 08:00:31 -04:00
Brad King
8c4d11fa52 Merge topic 'VxWorks-platform-id'
b22586be01 VxWorks: Add Platform ID for Modules/CMakePlatformId.h.in

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4922
2020-06-23 08:00:31 -04:00
Lihua Zhao
b22586be01 VxWorks: Add Platform ID for Modules/CMakePlatformId.h.in 2020-06-23 07:59:32 -04:00
Brad King
069e904337 Merge topic 'fix-win-flex-bison' into release-3.18
0faa2b9870 Find{FLEX,BISON}: Add 'win-' executable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4931
2020-06-23 07:56:39 -04:00
Brad King
0a337716ce Merge topic 'fix-win-flex-bison'
0faa2b9870 Find{FLEX,BISON}: Add 'win-' executable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4931
2020-06-23 07:56:39 -04:00
Brad King
df69cb37d1 Merge topic 'FindCUDA-11' into release-3.18
1d9f2f9714 FindCUDA: Do not search for the deprecated nppicom when CUDA >= 11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4929
2020-06-23 07:55:40 -04:00
Brad King
d80a370e75 Merge topic 'FindCUDA-11'
1d9f2f9714 FindCUDA: Do not search for the deprecated nppicom when CUDA >= 11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4929
2020-06-23 07:55:40 -04:00
Yan
0faa2b9870 Find{FLEX,BISON}: Add 'win-' executable names
Distributions of these tools on Windows now use a `win-` prefix
instead of the previously-seen `win_` prefix.  Search for both.
2020-06-22 15:50:22 -04:00
Robert Maynard
1d9f2f9714 FindCUDA: Do not search for the deprecated nppicom when CUDA >= 11
The nppicom library has been removed in preference of nvjpeg starting
in CUDA 11.

Fixes: #20845
2020-06-22 11:56:51 -04:00
Brad King
c19b5765e1 Merge topic 'FindSDL-update'
9ffd2c70bf FindSDL: Add SDL_INCLUDE_DIRS, SDL_LIBRARIES, and SDL::SDL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4902
2020-06-19 08:16:40 -04:00
Brad King
21d0961bc2 Merge topic 'CUDAToolkit-cuda-11' into release-3.18
b284a3c764 CudaToolkit: Update for new/removed libraries in CUDA 11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4917
2020-06-19 08:13:08 -04:00
Brad King
09d46e9bb6 Merge topic 'CUDAToolkit-cuda-11'
b284a3c764 CudaToolkit: Update for new/removed libraries in CUDA 11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4917
2020-06-19 08:13:08 -04:00
Brad King
0741c50275 Merge topic 'cuda-toolkit-vs'
a0280801f4 CUDA: Fix CMAKE_CUDA_COMPILER_TOOLKIT_ROOT detection in Visual Studio
90be0916b5 CUDA: Re-order some logic for determining the compiler
4ab5f109f0 CUDA: Remove unused variables while determining compiler
492e5f01fa CUDA: Simplify CMAKE_CUDA_COMPILER_TOOLKIT_ROOT computation
4785bd6153 CUDA: Skip the entire search for nvcc when it is CMAKE_CUDA_COMPILER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4921
2020-06-19 08:12:04 -04:00
Brad King
7e854614b4 Merge topic 'cuda_nvcc_exe_search'
d9c1f05924 CUDA: Fix NVCC executable search during compiler detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4920
2020-06-19 08:10:33 -04:00
Frédéric Simonis
9ffd2c70bf FindSDL: Add SDL_INCLUDE_DIRS, SDL_LIBRARIES, and SDL::SDL
Also provide `SDL_VERSION[_{MAJOR,MINOR,PATCH}]`.

Fixes: #12911
2020-06-18 16:33:17 -04:00
Brad King
a0280801f4 CUDA: Fix CMAKE_CUDA_COMPILER_TOOLKIT_ROOT detection in Visual Studio
When using a Visual Studio generator, we do not know the path to
`CMAKE_CUDA_COMPILER` until after the compiler id detection project
extracts it.  However, based on the VS toolchain configuration we know
that the compiler id will be NVIDIA, so use that to drive the CUDA
architecture flag logic.  After the main compiler id step we know
`CMAKE_CUDA_COMPILER`, so `CMAKE_CUDA_COMPILER_TOOLKIT_ROOT` can then be
computed.
2020-06-18 15:58:38 -04:00
Brad King
90be0916b5 CUDA: Re-order some logic for determining the compiler 2020-06-18 15:53:45 -04:00
Brad King
4ab5f109f0 CUDA: Remove unused variables while determining compiler 2020-06-18 15:50:10 -04:00
Brad King
492e5f01fa CUDA: Simplify CMAKE_CUDA_COMPILER_TOOLKIT_ROOT computation 2020-06-18 15:49:25 -04:00
Brad King
4785bd6153 CUDA: Skip the entire search for nvcc when it is CMAKE_CUDA_COMPILER 2020-06-18 15:48:40 -04:00
Raul Tambre
d9c1f05924 CUDA: Fix NVCC executable search during compiler detection
The result variable was `CUDAToolkit_NVCC_EXECUTABLE` instead of
`_CUDA_NVCC_EXECUTABLE`, which the rest of the code used.  Also, we can
simply `set()` the `_CUDA_NVCC_EXECUTABLE` value without searching.

Fixes: #20847
2020-06-18 15:07:31 -04:00
Brad King
310e953d58 Merge topic 'doc-3.18-fixups' into release-3.18
947cfc732d Help: Explicitly say transaction, don't abbreviate to trans
90c73479bc Help: Correct and condense examples for VS_SOLUTION_DEPLOY
0420de10b5 Help: Add missing cross-referencing for generator expressions
013f7a2647 Help: Formatting, crossref for FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>
a12d53acf3 Help: Add missing PCH_WARN_INVALID docs and related cleanups
95a16f7805 Help: Fix formatting error and consistency for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4915
2020-06-18 12:44:14 -04:00
Brad King
4b6ba7c3d8 Merge topic 'doc-3.18-fixups'
947cfc732d Help: Explicitly say transaction, don't abbreviate to trans
90c73479bc Help: Correct and condense examples for VS_SOLUTION_DEPLOY
0420de10b5 Help: Add missing cross-referencing for generator expressions
013f7a2647 Help: Formatting, crossref for FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>
a12d53acf3 Help: Add missing PCH_WARN_INVALID docs and related cleanups
95a16f7805 Help: Fix formatting error and consistency for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4915
2020-06-18 12:44:14 -04:00
Brad King
349fb099eb Merge topic 'mkl-lib-dir'
8d5a07ce76 FindLAPACK: Extend search directories for MKL
d880d2805f FindBLAS: Extend search directories for MKL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4905
2020-06-18 09:42:34 -04:00
Brad King
cadc658e9d Merge topic 'armclang-typo'
2ff68c00e0 ARMClang: Fix typo in -Xlinker flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4916
2020-06-18 09:37:47 -04:00
Robert Maynard
b284a3c764 CudaToolkit: Update for new/removed libraries in CUDA 11 2020-06-18 08:52:58 -04:00
Osama Moharam
2ff68c00e0 ARMClang: Fix typo in -Xlinker flag
Fix a typo from commit ef816610be (ARMClang: allow fallback to -march
and correct setting of --cpu flags, 2020-06-03, v3.18.0-rc1~18^2).
2020-06-18 07:43:22 -04:00
Craig Scott
95a16f7805 Help: Fix formatting error and consistency for gtest_discover_tests() 2020-06-18 20:23:57 +10:00
Brad King
55ade79ab8 Merge topic 'cuda_clang_limitations'
bdb105ee94 Help: Mention CUDA Clang limitations in 3.18 release notes
fec7dd33d3 CUDA: Add issue number to Clang separable compilation error
14163d7d6b CUDA: Throw error for Clang on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4903
2020-06-17 06:44:25 -04:00
Raul Tambre
14163d7d6b CUDA: Throw error for Clang on Windows
Supporting compiling on Windows is more complicated than initially expected, so
it won't make it into CMake 3.18.
Add a helpful error for users.
2020-06-16 14:06:43 -04:00
evatux
8d5a07ce76 FindLAPACK: Extend search directories for MKL
Even though Intel MKL typically puts the libraries under
`$MKLROOT/lib/$arch_$os` some installations may still use
`$MKLROOT/lib/$arch/` path. Ideally, `$arch` should be a
symlink to `$arch_$os`, but sometimes the opposite happens
(for instance, see Intel MKL distribution in Arch Linux [1]),
and sometimes only `$arch` directory alone is present.

This patch extends the search list with `$MKLROOT/lib/$arch` with
lower priority than `$MKLROOT/lib/$arch_$os`, as the latter is the
official path to Intel MKL libraries.

It is also worth mentioning that Intel MKL Link Line Adviser [2]
recommends using `$MKLROOT/lib/$arch` directory in a link line:
```
 -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64
 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
```

[1] https://www.archlinux.org/packages/community/x86_64/intel-mkl/files/

[2] https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link-line-advisor.html
2020-06-16 10:33:18 -07:00
evatux
d880d2805f FindBLAS: Extend search directories for MKL
Even though Intel MKL typically puts the libraries under
`$MKLROOT/lib/$arch_$os` some installations may still use
`$MKLROOT/lib/$arch/` path. Ideally, `$arch` should be a
symlink to `$arch_$os`, but sometimes the opposite happens
(for instance, see Intel MKL distribution in Arch Linux [1]),
and sometimes only `$arch` directory alone is present.

This patch extends the search list with `$MKLROOT/lib/$arch` with
lower priority than `$MKLROOT/lib/$arch_$os`, as the latter is the
official path to Intel MKL libraries.

It is also worth mentioning that Intel MKL Link Line Adviser [2]
recommends using `$MKLROOT/lib/$arch` directory in a link line:
```
 -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64
 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
```

[1] https://www.archlinux.org/packages/community/x86_64/intel-mkl/files/

[2] https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link-line-advisor.html
2020-06-16 10:33:11 -07:00
Brad King
b065d25821 Merge topic 'FindCurses-nodelay'
3211e07dc6 FindCurses: Detect and satisfy dependency on tinfo for nodelay

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4892
2020-06-16 09:08:49 -04:00
Paymon MARANDI
3211e07dc6 FindCurses: Detect and satisfy dependency on tinfo for nodelay
Extend the change from commit 1f646c6ce0 (FindCurses: Detect and satisfy
ncurses dependency on tinfo, 2014-01-17, v3.0.0-rc5~6^2) to handle
`nodelay` too.
2020-06-15 16:27:25 -04:00
Alex Turbov
915409af49 CPack: Introduce pre- and post- build actions
CPack learned the `CPACK_PRE_BUILD_SCRIPTS`, `CPACK_POST_BUILD_SCRIPTS`,
and `CPACK_PACKAGE_FILES` variables.

The first two are lists of scripts to perform
- after pre-install files into a staging directory and before
  producing the resulting packages
- after produsing the packages

The post-build script(s) also get the list of actually produced
packages in the `CPACK_PACKAGE_FILES`.

Issue: #19077
2020-06-15 11:06:41 -04:00
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
5d710f2d11 Merge topic 'cuda_clang_toolkit_path'
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
Brad King
e366317674 Merge topic 'cuda_architectures_disable'
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
8e61ebb75e Merge topic 'clang_cxx20'
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
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