summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'clang-imsvc'Brad King2021-02-102-1/+1
|\ | | | | | | | | | | | | | | 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
| * Clang: Use -imsvc for system include only with MSVC-like front-endBrad King2021-02-092-1/+1
| | | | | | | | | | | | | | | | | | | | 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
| * Merge topic 'FindXCTest-bundle-inject' into release-3.19Brad King2021-02-091-2/+9
| |\ | | | | | | | | | | | | | | | | | | eafe740ead FindXCTest: Fix output directory for test bundle with new build system Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5786
* | \ Merge topic 'FindXCTest-bundle-inject'Brad King2021-02-091-2/+9
|\ \ \ | | |/ | |/| | | | | | | | | | | | | eafe740ead FindXCTest: Fix output directory for test bundle with new build system Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5786
| * | FindXCTest: Fix output directory for test bundle with new build systemYauheni Khnykin2021-02-081-2/+9
| | | | | | | | | | | | | | | | | | | | | The output directory was still correct for macOS with the new build system, but not for iOS. Fixes: #20662
* | | Merge topic 'xcode12-ios_install_combined'Brad King2021-02-091-13/+18
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5785
| * | IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)Craig Scott2021-02-081-13/+18
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge topic 'cuda_support_nvcc_from_hpctoolkit'Brad King2021-02-093-38/+32
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | CUDA: Always extract CUDA Toolkit root from nvcc verbose outputRobert Maynard2021-02-083-38/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic '21479-branding-name-cpack-nsis'Brad King2021-02-091-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 0aabeb0c30 CPack/NSIS: Add option for setting branding text Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5784
| * | | CPack/NSIS: Add option for setting branding textJohnny Jazeix2021-02-071-0/+1
| |/ / | | | | | | | | | | | | | | | | | | See https://nsis.sourceforge.io/Reference/BrandingText for more information. Fixes: #21479
* | | AddFileDependencies: Deprecate this unnecessary moduleBrad King2021-02-081-1/+13
| | | | | | | | | | | | Document that one can call `set_property` directly instead.
* | | MacroAddFileDependencies: Explicitly deprecate by documentationBrad King2021-02-081-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | MacroAddFileDependencies: Simplify implementationBrad King2021-02-081-8/+1
| | |
* | | Merge topic 'AddFileDependencies-simplify'Brad King2021-02-081-11/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f6fc388ea AddFileDependencies: Avoid leaking temporary variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !5779
| * | | AddFileDependencies: Avoid leaking temporary variableAnakin Skywalker2021-02-081-11/+4
| |/ / | | | | | | | | | | | | Convert `add_file_dependencies` to a function. Simplify the implementation using `set_property` with `APPEND`.
* | | Merge topic 'cmake_library_architecture_better_multiarch_support'Brad King2021-02-083-21/+61
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 657fc3a9a7 CMakeDetermineCompilerABI: Parse library arch from versioned paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5773
| * | | CMakeDetermineCompilerABI: Parse library arch from versioned pathsRobert Maynard2021-02-043-21/+61
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge topic 'FindGit-version-optimization-more'Brad King2021-02-081-16/+17
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | c99dfd7be7 FindGit: Cache the version more effectively Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5774
| * | | FindGit: Cache the version more effectivelyCraig Scott2021-02-051-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 315a200f0c4 (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
* | | | Merge topic 'fetchcontent-performance'Brad King2021-02-0520-1088/+1887
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | FetchContent: Invoke steps directly and avoid a separate sub-buildCraig Scott2021-02-0413-308/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | ExternalProject: Refactor pre-configure steps to support no-target usesCraig Scott2021-02-0414-777/+1285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | ExternalProject: Avoid scanning docs for keywords, use include_guard()Craig Scott2021-01-291-54/+178
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge topic 'aix-xcoff-edit'Brad King2021-02-041-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | CMakeDetermineCompilerId: Recognize XCOFF executable formatBrad King2021-02-031-0/+5
| | |/ / | |/| |
* | | | Merge topic 'FindBoost-1.75'Brad King2021-02-041-2/+17
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | 8293064760 FindBoost: Add support for Boost 1.75 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5768
| * | FindBoost: Add support for Boost 1.75Brad King2021-02-031-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'findcudatoolkit_env_path'Brad King2021-02-031-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 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
| * | FindCUDAToolkit: Restore use of CUDA_PATH environment variableRobert Maynard2021-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | FindOpenSSL: Add support for version-rangeDeniz Bahadir2021-02-011-0/+8
| |/ |/|
* | Merge topic 'externalproject-update-refactor'Brad King2021-01-292-172/+237
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | ExternalProject: Improve robustness of update stepCraig Scott2021-01-281-172/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | ExternalProject: Prevent the noisy detached head messages on checkoutCraig Scott2021-01-281-0/+4
| | | | | | | | | | | | | | | | | | 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.
* | | FindBLAS: Add support for IntelLLVMWilliam R. Dieter2021-01-281-0/+3
| | | | | | | | | | | | Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | FindBoost: Add support for IntelLLVMWilliam R. Dieter2021-01-281-2/+4
| | | | | | | | | | | | | | | | | | Use the same code paths as the `Intel` compiler. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | FindOpenMP: Add support for IntelLLVMWilliam R. Dieter2021-01-281-0/+1
| | | | | | | | | | | | Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | FindMPI: Add support for IntelLLVMWilliam R. Dieter2021-01-281-1/+11
| | | | | | | | | | | | Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | IRSL: Add support for IntelLLVMWilliam R. Dieter2021-01-281-7/+7
| | | | | | | | | | | | | | | | | | Use the same code paths as the `Intel` compiler id. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | IntelLLVM: Add support for Intel LLVM-based compilersWilliam R. Dieter2021-01-2828-12/+496
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | GenerateExportHeader: Recognize Intel < 12 more strictlyWilliam R. Dieter2021-01-281-1/+1
|/ / | | | | | | | | | | Match exactly the `Intel` compiler id. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | FindOpenMP: Add support for NVHPC compilerTin Huynh2021-01-271-0/+1
| |
* | FindOpenACC: Add support for NVHPC compilerTin Huynh2021-01-271-1/+4
| |
* | GenerateExportHeader: Add support for NVHPC compilerBrad King2021-01-271-2/+2
| | | | | | | | Treat it just like PGI.
* | NVHPC: Add support for NVIDIA HPC SDK compilers based on PGITin Huynh2021-01-2711-0/+72
| | | | | | | | | | | | | | Identify the compilers as `NVHPC` to distinguish it from the older PGI compilers from which they evolved, and from other `NVIDIA` compilers. Fixes: #20887
* | CPack: add CPACK_THREADS variable to control compression threadsRodolfo Lima2021-01-261-0/+23
| | | | | | | | | | | | | | This allows setting how many threads the compressor will use. Currently only implemented for XZ when using system's lzma library. Fixes: #21715
* | Merge topic 'irsl-msvc-arm64'Brad King2021-01-261-7/+9
|\ \ | | | | | | | | | | | | | | | | | | 9c5cf0c1af IRSL: Add support for non-x86/x64 architectures such as arm64 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5733
| * | IRSL: Add support for non-x86/x64 architectures such as arm64pastdue2021-01-251-7/+9
| | | | | | | | | | | | | | | | | | Implement `CMAKE_MSVC_ARCH` determination for more architectures. Fixes: #16734
* | | Merge topic 'intel-fortran-nofor-main'Brad King2021-01-251-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 2a5955ac09 Intel: Replace deprecated Fortran flag -nofor_main with -nofor-main Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5729
| * | Intel: Replace deprecated Fortran flag -nofor_main with -nofor-mainBrad King2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `-nofor_main` flag was originally added by commit ccdd3e943d (Fix Intel Fortran SHARED libraries on Linux, 2009-10-27, v2.8.2~915). Since then, Intel Fortran renamed the option to `-nofor-main` and deprecated the old name. The new name has been available for a long time, so we can just switch to it. Fixes: #21735