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
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.
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
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
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
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
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
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
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.
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
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.
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
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.
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.
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.
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.
When boost is built with `BZIP2_SOURCE` or `ZLIB_SOURCE` it will
generate boost versions of these libraries. Since commit cb1a434ce0
(FindBoost: Add check headers for `zlib` and `bzip2`, 2016-07-01,
v3.7.0-rc1~400^2) we look for them only on Windows where they are
commonly provided, but they may be available on every platform.
74b1c9fc8e Explicitly specify language flag when source LANGUAGE property is set
457170a476 CXX: Compile when possible with explicit `Cxx` language flag set
644d3b86eb C: Compile when possible with explicit `C` language flag set
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4780