Commit Graph

11339 Commits

Author SHA1 Message Date
Brad King
ea07176b9a Merge topic 'FindBoost-no-warn'
90467747a1 FindBoost: Add option to suppress new boost version dependency warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5794
2021-02-10 08:14:40 -05:00
John Melas
90467747a1 FindBoost: Add option to suppress new boost version dependency warning
Add option `Boost_NO_WARN_NEW_VERSIONS` to suppress new boost version
dependency warning.

Fixes: #21786
2021-02-10 08:02:24 -05:00
Brad King
bb68658e98 Merge topic 'findcudatoolkit_handle_cuda_compiler_without_enabled_lang'
cd89d1c328 FindCUDAToolkit: Robust version checks when CUDA lang is not enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Tested-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5787
2021-02-10 07:48:50 -05:00
Brad King
691e8ac480 Merge topic 'clang-imsvc'
2fc5e5dba9 Clang: Use -imsvc for system include only with MSVC-like front-end

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !5792
2021-02-10 07:46:33 -05:00
Brad King
2fc5e5dba9 Clang: Use -imsvc for system include only with MSVC-like front-end
In commit bb61c2d024 (Clang: use -imsvc for system include dirs when
running on Windows, 2020-09-16, v3.19.0-rc1~162^2) we added `-imsvc`
for all Clang compilers targeting the MSVC ABI.  However, the option
only exists for the MSVC-like front-end.  The GNU-like front-ends
use `-isystem`.

Fixes: #21789
2021-02-09 11:24:41 -05:00
Robert Maynard
cd89d1c328 FindCUDAToolkit: Robust version checks when CUDA lang is not enabled
Previously if you set `CMAKE_CUDA_COMPILER` but hadn't enabled
the CUDA language, FindCUDAToolkit would not correctly compute
the version information.
2021-02-09 09:39:20 -05:00
Brad King
340ca27f8d Merge topic 'FindXCTest-bundle-inject' into release-3.19
eafe740ead FindXCTest: Fix output directory for test bundle with new build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5786
2021-02-09 08:25:27 -05:00
Brad King
c4c902d132 Merge topic 'FindXCTest-bundle-inject'
eafe740ead FindXCTest: Fix output directory for test bundle with new build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5786
2021-02-09 08:25:27 -05:00
Brad King
cab99f7dba Merge topic 'xcode12-ios_install_combined'
0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5785
2021-02-09 08:23:30 -05:00
Brad King
9b9075f723 Merge topic 'cuda_support_nvcc_from_hpctoolkit'
3cef91a321 CUDA: Always extract CUDA Toolkit root from nvcc verbose output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Tested-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5777
2021-02-09 08:21:17 -05:00
Brad King
18fa819e26 Merge topic '21479-branding-name-cpack-nsis'
0aabeb0c30 CPack/NSIS: Add option for setting branding text

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5784
2021-02-09 08:20:17 -05:00
Yauheni Khnykin
eafe740ead FindXCTest: Fix output directory for test bundle with new build system
The output directory was still correct for macOS with the new build system,
but not for iOS.

Fixes: #20662
2021-02-09 10:20:57 +11:00
Robert Maynard
3cef91a321 CUDA: Always extract CUDA Toolkit root from nvcc verbose output
Fixes #21750, #21763

Given that NVCC can be provided by multiple different sources (NVIDIA HPC SDK, CUDA Toolkit, distro)
each of which has a different layout, we need to extract the CUDA toolkit root from the compiler
itself, allowing us to support numerious different scattered toolkit layouts.

The NVIDIA HPC SDK specifically ships two copies of nvcc one in
`compilers/bin/` and one in `cuda/bin`. Thus when using
`compilers/bin/nvcc` the Toolkit root logic fails.
2021-02-08 12:13:01 -08:00
Brad King
9cddaad940 AddFileDependencies: Deprecate this unnecessary module
Document that one can call `set_property` directly instead.
2021-02-08 12:44:37 -05:00
Brad King
4841d38a7a MacroAddFileDependencies: Explicitly deprecate by documentation
This module has been discouraged since commit 1e20be319f (STYLE: add
documentation for MACRO_ADD_FILE_DEPENDENCIES(), 2009-07-14,
v2.8.0~433).  It has been listed in the `cmake-modules(7)` manual
as deprecated since commit df780bcc01 (Help: Move deprecated modules to
appropriate section., 2018-11-12, v3.14.0-rc1~374^2).  Add the explicit
deprecation mark in its documentation.
2021-02-08 12:34:15 -05:00
Brad King
777c14af82 MacroAddFileDependencies: Simplify implementation 2021-02-08 12:34:15 -05:00
Brad King
17d4138108 Merge topic 'AddFileDependencies-simplify'
0f6fc388ea AddFileDependencies: Avoid leaking temporary variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5779
2021-02-08 12:22:23 -05:00
Anakin Skywalker
0f6fc388ea AddFileDependencies: Avoid leaking temporary variable
Convert `add_file_dependencies` to a function.
Simplify the implementation using `set_property` with `APPEND`.
2021-02-08 12:21:43 -05:00
Brad King
326cceaafc Merge topic 'cmake_library_architecture_better_multiarch_support'
657fc3a9a7 CMakeDetermineCompilerABI: Parse library arch from versioned paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5773
2021-02-08 12:05:07 -05:00
Brad King
4b406ead2a Merge topic 'FindGit-version-optimization-more'
c99dfd7be7 FindGit: Cache the version more effectively

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5774
2021-02-08 12:04:17 -05:00
Craig Scott
0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)
Xcode 12 doesn't allow nested builds within the same build directory.
That means we can no longer do an install by building the install target
when IOS_INSTALL_COMBINED is true. We can, however, still do an install
by running the cmake_install.cmake script or executing cmake --install,
since there is no outer build and therefore the associated SDK can be
built as a sub-build.

The non-build methods previously didn't work when
IOS_INSTALL_COMBINED was true because the generated install script
and the CMakeIOSInstallCombined script both made certain assumptions
that relied on being part of a build. Those assumptions are now
removed. A side-effect of this work is that cpack now also works from the
command line when IOS_INSTALL_COMBINED is true.

Relates: #21282
Fixes: #20023
2021-02-08 18:02:46 +11:00
Johnny Jazeix
0aabeb0c30 CPack/NSIS: Add option for setting branding text
See https://nsis.sourceforge.io/Reference/BrandingText
for more information.

Fixes: #21479
2021-02-07 16:10:57 +01:00
Brad King
acb33d0904 Merge topic 'fetchcontent-performance'
17e5516e60 FetchContent: Invoke steps directly and avoid a separate sub-build
4f3d1abbb4 ExternalProject: Refactor pre-configure steps to support no-target uses
23aab9ecce ExternalProject: Avoid scanning docs for keywords, use include_guard()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Acked-by: Lars Melchior <lars.melchior@gmail.com>
Merge-request: !5749
2021-02-05 07:01:05 -05:00
Craig Scott
c99dfd7be7 FindGit: Cache the version more effectively
In 315a200f0c (FindGit: Cache the GIT_EXECUTABLE version for the
current run, 2021-01-20), the GIT_VERSION_STRING was meant to be
cached after the first time it was computed for a given GIT_EXECUTABLE
location. That logic assumed GIT_VERSION_STRING would be visible in
the current scope, but it might not be. The global property alone is
enough to check whether the version has been determined previously,
so don't switch the logic based on whether GIT_VERSION_STRING is
defined or not.

Relates: #21703
2021-02-05 21:45:00 +11:00
Craig Scott
17e5516e60 FetchContent: Invoke steps directly and avoid a separate sub-build
The cost of setting up and executing a separate sub-build to do the
download, update and patch steps required for FetchContent population
can be significant with some platforms and CMake generators. Avoid the
sub-build altogether by invoking the step scripts directly.

Previously, if no generator was set (e.g. population was being done in
script mode), a generator needed to be available on the default PATH.
Since we no longer use a sub-build, this restriction is also now gone.

Fixes: #21703
2021-02-05 07:33:38 +11:00
Craig Scott
4f3d1abbb4 ExternalProject: Refactor pre-configure steps to support no-target uses
The mkdir, download, update and patch steps are used by
FetchContent during the configure phase of the main build. Because
these steps need a target, this has so far required a sub-build to be
set up. The changes here factor out the preparation of the scripts
from the creation of the targets, allowing future work to leverage these
steps without a sub-build (see #21703).

As part of the refactoring, some rationalisation of the stamp files,
repository info files and script names was done to make things more
consistent between download methods and step implementations.
Every download method now records its own specific repository info
in a file and that file is a dependency of the download step. The source
directory is also written to that file, so if the SOURCE_DIR changes, the
download will be retriggered (the existing implementation fails in this
scenario). Each download method now also has just one driver script
that implements the whole step (it may pull in other scripts to do its
task though). The patch step gained support for USES_TERMINAL as
a result of generalising the implementation for custom commands.

Fixes: #21748
2021-02-05 07:33:38 +11:00
Robert Maynard
657fc3a9a7 CMakeDetermineCompilerABI: Parse library arch from versioned paths
Teach CMake how to extract `CMAKE_<LANG>_LIBRARY_ARCHITECTURE` from
versioned paths such as `/usr/lib/gcc/x86_64-linux-gnu/9`. These kind of
paths are generated by NVHPC compilers.
2021-02-04 15:17:49 -05:00
Brad King
67cb006732 Merge topic 'aix-xcoff-edit'
e017ba046c AIX: Enable XCOFF editing to replace RPATH on installation
56fc4a325f cmXCOFF: Add helper to parse and edit the XCOFF binary format
ddaaee907d CMakeDetermineCompilerId: Recognize XCOFF executable format
69e1d95a8a Tests: Add sample XCOFF binaries
f79d991dfd Tests: Convert CMake.ELF to RunCMake.file-RPATH ELF case
d8f3e68ca9 Ninja Multi-Config: Enable relink diagnostic message
cdcfe3eb99 Rename CMAKE_USE_MACH_PARSER to CMake_USE_MACH_PARSER
b6071c93f5 Rename CMAKE_USE_ELF_PARSER to CMake_USE_ELF_PARSER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5769
2021-02-04 08:29:57 -05:00
Brad King
f82fb91382 Merge topic 'FindBoost-1.75'
8293064760 FindBoost: Add support for Boost 1.75

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5768
2021-02-04 08:19:17 -05:00
Brad King
ddaaee907d CMakeDetermineCompilerId: Recognize XCOFF executable format 2021-02-03 12:26:58 -05:00
Brad King
8293064760 FindBoost: Add support for Boost 1.75
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_75_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.75.0 source tree.
They differ from 1.74's dependencies by the addition of
dependencies of the json component, so add a new version
block to FindBoost.

Fixes: #21773
2021-02-03 12:10:40 -05:00
Brad King
8a131c92a4 Merge topic 'findcudatoolkit_env_path'
4ea6d3c3ae FindCUDAToolkit: Restore use of CUDA_PATH environment variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5761
2021-02-03 10:51:29 -05:00
Robert Maynard
4ea6d3c3ae FindCUDAToolkit: Restore use of CUDA_PATH environment variable
Refactoring in commit 7cc815a2a6 (CUDAToolkit: Detect CUDA SDK that
don't have nvcc, 2020-07-24, v3.19.0-rc1~366^2) accidentally broke
use of the `CUDA_PATH` environment variable.

Fixes: #21740
2021-02-03 10:35:21 -05:00
Deniz Bahadir
bc00cf9300 FindOpenSSL: Add support for version-range 2021-02-01 12:27:05 +01:00
Craig Scott
23aab9ecce ExternalProject: Avoid scanning docs for keywords, use include_guard()
The previous implementation was scanning the documentation in
the file at runtime to determine the set of supported keywords for
each public function. This was fragile, made it difficult to restructure
the documentation and was sometimes observable in runtime
performance measurements. Change to a more conventional
approach where supported keywords are explicitly listed in the
code.

The internal _ExternalProject_SELF variable is no longer needed.
CMake now provides CMAKE_CURRENT_FUNCTION_LIST_DIR which
can be used for the same purpose and avoids having to set a
variable when the module is read. This also removes the
requirement that the module must be included by the current or a
parent scope. It is now enough that the module has been included
once somewhere before calling any of its functions. 

The above changes combined mean that the module can now use
include_guard() and avoid having to re-parse the very long file every
time.
2021-01-30 00:12:23 +11:00
Brad King
36bb0e32d7 Merge topic 'externalproject-update-refactor'
ac6a4d4884 ExternalProject: Improve robustness of update step
17c4c8b92b Tests: Prevent the noisy CMP0114 warnings in ExternalProjectUpdate test
1cb65e680d ExternalProject: Prevent the noisy detached head messages on checkout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5389
2021-01-29 08:10:21 -05:00
Craig Scott
ac6a4d4884 ExternalProject: Improve robustness of update step
Refactor the update logic to make it easier to follow. The following
fixes/improvements are some consequences of this change:

* Absorb a confusing git checkout failure message when the failure
  is allowed and we act on that failure appropriately.
* Fix an unnecessary fetch in some scenarios when checking out a
  git hash we already have locally.
* Stash and restore any local changes even when not rebasing.
* Avoid unsafe rebasing where we are not on a branch that is
  already tracking the requested branch.
* When fetching, use --tags --force to ensure we get all the tags
  and commits leading up to them regardless of whether the tags
  are on branches or not. Also update our local tags if they move
  on the remote.

Fixes: #20677
2021-01-28 09:32:35 -05:00
Craig Scott
1cb65e680d ExternalProject: Prevent the noisy detached head messages on checkout
When checking out a specific commit by its git hash, git will output
a very noisy message about checking out a detached HEAD. This
is not particularly helpful for us here and makes the output overall
quite verbose. Add a git config setting to prevent it.
2021-01-28 09:32:35 -05:00
William R. Dieter
aedb9add56 FindBLAS: Add support for IntelLLVM
Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:07:01 -05:00
William R. Dieter
37ac9df342 FindBoost: Add support for IntelLLVM
Use the same code paths as the `Intel` compiler.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:07:00 -05:00
William R. Dieter
042aba3db4 FindOpenMP: Add support for IntelLLVM
Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:07:00 -05:00
William R. Dieter
90941a1896 FindMPI: Add support for IntelLLVM
Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:07:00 -05:00
William R. Dieter
67dfc6556c IRSL: Add support for IntelLLVM
Use the same code paths as the `Intel` compiler id.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:07:00 -05:00
William R. Dieter
a90d2a9eed IntelLLVM: Add support for Intel LLVM-based compilers
Using a single ID 'IntelLLVM' for the suite of Intel compilers based on
the LLVM backend.  The 'IntelLLVM' ID are used for C, C++, and Fortran.
Data Parallel C++ will be handled in a separate commit.

The C and C++ definitions are based on the Clang definitions.  The Intel
LLVM-based C and C++ compilers are based on the Clang front end, so
existing Clang options are more likely to be a good match than options
for the older Intel compilers.

Fortran is based on the older Fortran front end with the LLVM backend.
It has a similar interface to the older versions, though many options
are shared with the C and C++ compilers.

Fixes: #21561
Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:05:35 -05:00
William R. Dieter
9bef4bef0f GenerateExportHeader: Recognize Intel < 12 more strictly
Match exactly the `Intel` compiler id.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:05:35 -05:00
Tin Huynh
90502d76b7 FindOpenMP: Add support for NVHPC compiler 2021-01-27 09:53:02 -05:00
Tin Huynh
76dee5831b FindOpenACC: Add support for NVHPC compiler 2021-01-27 09:53:02 -05:00
Brad King
ff7bab83c2 GenerateExportHeader: Add support for NVHPC compiler
Treat it just like PGI.
2021-01-27 09:53:02 -05:00
Tin Huynh
83ea49818f NVHPC: Add support for NVIDIA HPC SDK compilers based on PGI
Identify the compilers as `NVHPC` to distinguish it from the older PGI
compilers from which they evolved, and from other `NVIDIA` compilers.

Fixes: #20887
2021-01-27 09:53:02 -05:00
Rodolfo Lima
bdf30bdad8 CPack: add CPACK_THREADS variable to control compression threads
This allows setting how many threads the compressor will use.
Currently only implemented for XZ when using system's lzma library.

Fixes: #21715
2021-01-26 16:23:37 +01:00