summaryrefslogtreecommitdiff
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* FindThreads: Honor THREADS_PREFER_PTHREAD_FLAG when pthread is found in libcMattias Ellert2022-01-261-8/+11
| | | | | | | | The `-pthread` flag tells the compiler/linker to link to additional libraries needed for thread support (e.g. libatomic on riscv64). The flag therefore should be used if requested using `THREADS_PREFER_PTHREAD_FLAG` also when the pthread functions are found in libc.
* VS: Fix detecting icx.exe with Intel Compiler toolsets newer than 2021William R. Dieter2021-12-151-5/+3
| | | | | | | | | | | | | | The logic added by commit 7808cbd644 (CMakeDetermineCompilerId: support Intel DPC++ compiler toolset for VS gen, 2020-12-06, v3.20.0-rc1~330^2) matches a specific toolset known to be the `icx.exe` compiler, and assumes all other Intel C++ compilers (that are not DPC++) must be `icl.exe`. Since `icx.exe` is officially replacing `icl.exe`, use a regex that matches the now-fixed set of toolsets known to use `icl.exe`. Any other Intel C++ compiler will be assumed to be `icx.exe`. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* UseSWIG: ensure directory for depfile existsMarc Chevrier2021-11-191-1/+1
| | | | | | | When `Visual Studio` and `Xcode` generators are used, directory for depfile is not implicitely created by CMake when OUTFILE_DIR option is used. Fixes: #22932
* Merge branch 'IntelLLVM-Fortran-frontend-variant' into release-3.21Brad King2021-11-111-0/+1
|\ | | | | | | Merge-request: !6718
| * Fortran: Save frontend variant persistently for IntelLLVMWilliam R. Dieter2021-11-111-0/+1
| | | | | | | | | | | | | | | | | | Since commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based compilers, 2020-11-02, v3.20.0-rc1~89^2~20), our IntelLLVM compiler support populates `CMAKE_Fortran_COMPILER_FRONTEND_VARIANT`. However, the frontend variant was not stored in `CMakeCompilerFortran.cmake`. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
| * Merge branch 'msvc-c++23' into release-3.20Brad King2021-10-121-0/+1
| |\ | | | | | | | | | Merge-request: !6614
| * \ Merge branch 'revert-debian-libexec' into release-3.20Brad King2021-10-081-13/+2
| |\ \ | | | | | | | | | | | | Merge-request: !6607
* | | | IntelLLVM: Use MSVC linker with MSVC frontend variantWilliam R. Dieter2021-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Intel compiler (pre-LLVM) expected xilink.exe and had special logic to set xilink.exe. The newer LLVM-based compiler does not want xilink.exe. link.exe works better for host code, and is the default, so change the matching condition such that the old compiler matches (and gets xilink.exe) and the new compiler gets the default link.exe it expects. A better solution will be to use the compiler as the linker. A future change will switch to compiler as linker by default, but that fix needs more validation. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | | GNUtoMS: Add search path for VS 2022 environment scriptsBrad King2021-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the logic from commit 08c5b3eff0 (GNUtoMS: Add search path for VS 2019 environment scripts, 2020-01-09, v3.16.3~15^2) to consider VS 2022 paths too. Fixes: #22847
* | | | BinUtils: Avoid llvm-strip versions older than Clang 11Brad King2021-10-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit cf82300a63 (BinUtils: Clarify search logic and make it more consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the more-specific name `llvm-strip` over `strip` when using Clang. However, `llvm-strip` from Clang versions prior to 11 require extra flags to strip everything. Until our `install(TARGETS)` logic learns to add those flags, avoid using older versions of `llvm-strip` by default. Fixes: #22785
* | | | IRSL: Fix discovery of VS 2022 v143 toolset redistributables for preview 5Brad King2021-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VS 2022 Preview 5 renamed the redist directories from `Microsoft.VC142.*` to `Microsoft.VC143.*` in order to match the `v143` toolset name. Fixes: #22586
* | | | Merge branch 'msvc-c++23' into release-3.21Brad King2021-10-121-0/+1
|\ \ \ \ | | |_|/ | |/| | | | | | Merge-request: !6614
| * | | MSVC: Tolerate cxx_std_23 feature on older compiler versionsBrad King2021-10-071-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 3aaf1d91bf (MSVC: C++20 final flag, C++23 support, 2021-05-29, v3.20.4~7^2~1) we forgot to add `cxx_std_23` to the fallback table for MSVC versions from VS 2010 through VS 2015. This allows project to at least attempt compilation with these compilers since they do not have any modes. Issue: #22729
* | | Merge topic 'revert-debian-libexec' into release-3.21Brad King2021-10-081-13/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 6658e260d4 GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6607
| * | GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIRTimo Röhling2021-10-071-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 798c1c3192 (GNUInstallDirs: Comply with Debian Policy on LIBEXECDIR, 2020-10-08, v3.19.0-rc1~11^2). The Debian Policy builds upon FHS 3.0 and permits installing to `/usr/libexec`. While Policy does grant an additional exception for applications to use a single subdirectory of `/usr/lib/<triplet>`, this is not meant to replace `/usr/libexec` as valid target. Fixes: #22731
* | | Merge topic 'corret_nvhpc_fortran_compile_deps' into release-3.21Brad King2021-10-073-12/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 1a828043b7 NVHPC: only use '-MD' for the C and CXX languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6602
| * | | NVHPC: only use '-MD' for the C and CXX languagesRobert Maynard2021-10-063-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | CMake shouldn't use '-MD' for nvfortran to generate dependency information. Fixes #22723
* | | | CPack/IFW: Add support for QtIFW 4.1Erlend E. Aasland2021-10-051-0/+1
| | | | | | | | | | | | | | | | Fixes: #22722
* | | | Merge topic 'FortranCInterface-timestamp-check' into release-3.21Brad King2021-10-041-2/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2a00e5072d FortranCInterface: Fix regression in timestamp check Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Craig Scott <craig.scott@crascit.com> Merge-request: !6581
| * | | | FortranCInterface: Fix regression in timestamp checkSeth R Johnson2021-10-011-2/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d7c8030541 (FortranCInterface: Fix misuse of IS_NEWER_THAN in timestamp check, 2021-02-21, v3.21.0-rc1~631^2~3), FortranCInterface checks for `Output.cmake.in` in the build tree instead of the source tree as before. This caused it to always re-run the detection. Fixes: #22709
* | | | FindMatlab: Add R2021b => 9.11 versionMichael Hirsch2021-09-231-0/+1
|/ / / | | | | | | | | | R2021b released 09/22/2021.
* | | Merge topic 'hip-no-hipcc' into release-3.21Brad King2021-09-2019-303/+101
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cb93f72624 HIP: Simplify detection of HIP runtime CMake package a71f0fc9c7 HIP: Remove ROMClang compiler id and use Clang directly b125e9809a HIP: Detect ROCm path earlier 735f41fc2d HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURES Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Raul Tambre <raul@tambre.ee> Acked-by: Axel Huebl <axel.huebl@plasma.ninja> Merge-request: !6533
| * | | HIP: Simplify detection of HIP runtime CMake packageBrad King2021-09-166-125/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It only makes sense to use the CMake package from the same ROCm installation that the compiler uses. Ask the HIP compiler to report the location of the ROCm installation. Verify up front that it contains the expected CMake package file.
| * | | HIP: Remove ROMClang compiler id and use Clang directlyBrad King2021-09-1614-164/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit bd844387df (ROCMClang: Add the ROCm toolkit derived clang compiler to CMake, 2020-08-28, v3.21.0-rc1~66^2~6) and commit ff0d2858e1 (HIP: Extract clang compiler details from hipcc, 2020-10-21, v3.21.0-rc1~66^2~5), the separate `ROCMClang` compiler id for `hipcc` has caused a few problems: * The compiler id changed from behavior of CMake 3.20 and below, breaking projects that already built with `hipcc` treated as `Clang`. * The implementation of `target_compile_features` was incomplete for the `ROCMClang` identity. * Only `hipcc` was identified as `ROCMClang`, so after it is unwrapped to the underlying `clang++`, future runs of new CMake versions on an existing build tree would not repeat this. * Clang should be usable as a HIP compiler without the `hipcc` wrapper. Remove the `ROMClang` compiler identity, and revise HIP language support to work directly with a Clang compiler. Reject direct `hipcc` usage as a HIP compiler. For now it cannot be supported because it interferes with flags CMake needs to pass to Clang. Fixes: #22536, #22460, #22593
| * | | HIP: Detect ROCm path earlierBrad King2021-09-163-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fail early if it is not found. Use the detected location as a hint to find `rocm_agent_enumerator`. Also remove the leading `_` prefix in case we want to document this publicly later.
| * | | HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURESZack Galbreath2021-09-161-3/+34
| | | |
* | | | Merge topic 'android-PATH' into release-3.21Brad King2021-09-171-5/+0
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | 94f3776774 Android: Restore searching PATH for executables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6528
| * | | Android: Restore searching PATH for executableshhb2021-09-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit a7f41a7ee4 (Android: Fix find_* search order within NDK for unified toolchains, 2020-10-13, v3.20.0-rc1~610^2), we turn off `CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`. This breaks `find_program` searching `PATH` for host executables. Fortunately, the setting turns out not to be necessary, perhaps since commit cbc51a8be3 (Android: restructure android search paths, 2020-11-06, v3.20.0-rc1~509^2). Without it, none of NDK tests fail, so remove it to restore pre-3.20 behavior. Fixes: #22634
| * | | Merge branch 'GNUInstallDirs-variable-named-0' into release-3.20Brad King2021-08-241-1/+1
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !6474
* | | | | IAR: Restore support for projects not enabling policy CMP0057Jean-Marc Hengen2021-09-161-0/+5
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 5b9bfe738c (IAR: Moved search logic to BinUtils., 2021-07-19, v3.21.1~14^2), we use the `IN_LIST` operator in the `CMakeFindBinUtils` module. Set policy `CMP0057` to ensure it is available regardless of the project's policy settings. Fixes: #22640
* | | | Merge topic 'FindPyhton-homebew-on-Mac-M1' into release-3.21Marc Chevrier2021-09-071-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2636ad5045 FindPython: Ensure homebrew on Mac M1 is used Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6499
| * | | | FindPython: Ensure homebrew on Mac M1 is usedMarc Chevrier2021-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | Fixes: #22581
* | | | | Merge topic 'vs2022' into release-3.21Brad King2021-09-032-3/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 38c8f2c4e3 IRSL: Add discovery of VS 2022 v143 toolset redistributables f01ea7e391 MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6497
| * | | | | IRSL: Add discovery of VS 2022 v143 toolset redistributablesBrad King2021-09-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #22586
| * | | | | MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolsetBrad King2021-09-021-1/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was forgotten in commit 0c7f918fb1 (VS: Update Visual Studio 17 2022 generator for Preview 2, 2021-07-14, v3.21.1~29^2) when the toolset was first renumbered to `v143`. Fixes: #22585
* | | | | FindBoost: Add support for Boost 1.77Brad King2021-09-021-3/+18
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the list of known versions. Run the command cmake -DBOOST_DIR=/path/to/boost_1_77_0 \ -P Utilities/Scripts/BoostScanDeps.cmake to extract dependencies from the 1.77.0 source tree. The dependencies differ from those of 1.76: the `contract`, `thread`, and `wave` components no longer depend on `date_time`. The `math` component no longer depends on `atomic`. Fixes: #22588
* | | | Merge topic 'GNUInstallDirs-variable-named-0' into release-3.21Brad King2021-08-251-1/+1
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | 49a5dbcaff GNUInstallDirs: avoid unwanted variable dereference Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6474
| * | | GNUInstallDirs: avoid unwanted variable dereferenceBen Boeckel2021-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some situations, it seems that the variable `0` is defined. In the case found, it was set to `1`. This makes the detection of the missing third argument bogus and unnecessarily triggers a warning. This oversight was introduced in 229b5ee994 (GNUInstallDirs: Add dir argument to GNUInstallDirs_get_absolute_install_dir, 2020-10-31) prior to CMake 3.20's release cycle.
* | | | FindMPI: do not detect `-framework` as a compile flagBen Boeckel2021-08-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPICH 3.4.2 now reports `-framework OpenCL` as one of its compilation flag. The compile flag extraction is seeing it as a generic `-f` flag and misses its argument. This ends up with a compile option of `-framework` which eats the next flag (and may be very important). It does not seem that passing `-framework` as a link flag is necessary at this time, so that is being actively ignored for now. Fixes: #22555
* | | | Merge topic 'FindPkgConfig-restore-legacy-behavior' into release-3.21Brad King2021-08-191-0/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 17e4934dbf FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6461
| * | | | FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEWMarc Chevrier2021-08-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module behavior must be independent from `CMP0126` policy. Fixes: #22526
* | | | | Merge topic 'binutils-clang-fallback-ld' into release-3.21Brad King2021-08-191-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 788b7afff2 FindBinUtils: Fall back to ld for Clang without lld Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6457
| * | | | | FindBinUtils: Fall back to ld for Clang without lldThomas Bernard2021-08-181-2/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | If `lld` is not available, Clang can still use `ld`. Fixes: #22500
* | | | | Merge topic 'CheckLanguage-CMP0126' into release-3.21Brad King2021-08-191-0/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 89ed11ae6f CheckLanguage: Avoid CMP0126 warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6462
| * | | | | CheckLanguage: Avoid CMP0126 warningBrad King2021-08-181-0/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro's implementation converts a normal variable into a cache variable intentionally, so both are set. Explicitly set CMP0126 to NEW to avoid a warning in trace mode. This won't affect the module behavior because the code path does not activate if a normal variable is already defined anyway. Fixes: #22548
* | | | | Android: Fix NDK toolchain dir on arm64 macWangBin2021-08-181-1/+1
|/ / / /
* | | | Merge topic 'binutils-no-cmake-paths' into release-3.21Brad King2021-08-103-3/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc1f733cc7 BinUtils: Avoid searching CMAKE_PREFIX_PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6434
| * | | | BinUtils: Avoid searching CMAKE_PREFIX_PATHCristian Adam2021-08-093-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our `find_program` calls specify `HINTS` to look in the toolchain's directory first, and then in `PATH`. `CMAKE_PREFIX_PATH` may be specified by the user to help find packages for project dependencies, but this should not override the binutils. Fixes: #22512
* | | | | Merge topic 'nvhpc_support_new_c_and_c++_standards' into release-3.21Brad King2021-08-092-0/+10
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9ac426e460 NVHPC-C: Add support for C17 f5dbc27c27 NVHPC-CXX: Add support for C++20 Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !6430
| * | | | NVHPC-C: Add support for C17Robert Maynard2021-08-051-0/+5
| | | | |