summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * 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.
* | macOS: Restore support for Mac OS X 10.4 (Tiger)Evan Miller2021-08-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 4aed96e230 (Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too, 2021-04-06, v3.20.1~5^2) we always enable support for linking with `-rpath`. The intention of the change was to enable using the flag on iOS, tvOS and watchOS by avoiding a Darwin-specific version check. However, removing the check broke support for OS X 10.4 because the flag is not supported on that version. Restore a form of the check that disables the flag on OS X < 10.5 while still allowing it for the other Apple platforms. Since no one is doing iOS/tvOS/etc development on 10.4, this change should have no unintended side effects. Fixes: #22490
* | Merge branch 'backport-3.20-intel-oneapi-std-windows' into release-3.20Brad King2021-07-091-3/+2
|\ \ | | | | | | | | | Merge-request: !6328
| * | CMakeCCompilerId: Fix C standard detection in Clang and IntelLLVM MSVC modeRaul Tambre2021-07-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang does not define `__STDC__` if in MSVC compatibility mode, but does define `__STDC_VERSION__`. Avoid the fallback for this combination. This backports commit 7596d8b951 (CMakeCCompilerId: Fix C standard detection in Clang MSVC mode, 2021-02-07, v3.21.0-rc1~587^2~14) to the 3.20 release series. This is needed since commit 5115dd1e2c (IntelLLVM: Fix C/C++ standard level flags on Windows, 2021-07-07, v3.21.0-rc3~7^2^2) now that we activate C/C++ standard level logic for IntelLLVM when targeting the MSVC ABI.
* | | FindJPEG: Revert "Search for 'turbojpeg' and 'turbojpeg-static' too"Brad King2021-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 74cc2e3326 (FindJPEG: Search for 'turbojpeg' and 'turbojpeg-static' too, 2021-01-09, v3.20.0-rc1~176^2) pending further investigation. The "turbo" variants are not drop-in replacements on all platforms. Fixes: #22333
* | | Merge branch 'check_cxx_compiler_flag_no_normal_variable' into release-3.20Brad King2021-07-081-1/+0
|\ \ \ | |/ / |/| | | | | Merge-request: !6318
| * | Check*CompilerFlag: Do not set result as a normal variable tooRobert Maynard2021-07-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was previously fixed by commit d46590910c (Check*CompilerFlag: Do not set result as a normal variable too, 2020-09-21, v3.18.3~1^2^2), but was regressed by refactoring in commit 90dead024c (CheckCompilerFlag: unified way to check compiler flags per language, 2020-09-25, v3.19.0-rc1~88^2) due to the changes being developed concurrently. Fix it again, and add a test case. Fixes: #21207
* | | IntelLLVM: Fix C/C++ standard level flags on WindowsBrad King2021-07-072-12/+4
| |/ |/| | | | | | | | | | | | | | | In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based compilers, 2020-11-02, v3.20.0-rc1~89^2~20) we accidentally left out activation of the C/C++ standard level selection logic when IntelLLVM is targeting the MSVC ABI. Fixes: #22388
* | ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutionsCraig Scott2021-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | In 5e941a545b (ExternalProject: Ensure git fetch if updating to hash we don't have yet, 2021-05-09), the form ${ref}^{commit} was used to ensure the ref was treated as a commit. When running under a MSYS2 or Cygwin shell, the {commit} part can be translated by the shell, leaving it as ${ref}^commit, which git doesn't understand. Use the equivalent but safer form ${ref}^0, since it won't be subject to the shell substitution issue. Fixes: #22299
* | IRSL: Add Intel oneAPI redist location on WindowsBrad King2021-06-081-1/+3
| | | | | | | | Fixes: #22283
* | Merge topic 'FindBoost-json-header' into release-3.20Brad King2021-06-071-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | c44dfdfdbb FindBoost: Add check for json component header in Boost 1.75+ Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6193
| * | FindBoost: Add check for json component header in Boost 1.75+John Drouhard2021-06-041-0/+1
| | | | | | | | | | | | | | | | | | In commit 8293064760 (FindBoost: Add support for Boost 1.75, 2021-02-03, v3.19.5~9^2) the dependencies of the json component were added, but the header listing was left out.
* | | Clang/MSVC: C++20 final flag, C++23 supportRaul Tambre2021-05-291-3/+12
| | | | | | | | | | | | | | | Added in LLVM commit a8f75d497daa2684a03909d7c31d5bce11b427e1, will be released in 13.0.
* | | MSVC: C++20 final flag, C++23 supportRaul Tambre2021-05-291-1/+8
|/ / | | | | | | | | | | | | Microsoft intends to ship the final C++20 flag in VS 16.11 albeit with a few parts missing due planned ABI breaking changes. The current 16.11 Preview 1 toolchain version is 19.29.30129.3, so let's restrict based on that.
* | ExternalProject: Only add git config setting with git 1.7.7 or laterCraig Scott2021-05-201-3/+5
| | | | | | | | | | | | | | | | 1cb65e680d (ExternalProject: Prevent the noisy detached head messages on checkout, 2021-01-17) unconditionally added the advice.detachedHead git config setting, but it requires git 1.7.7 or later. Since it isn't fatal to not have it, just noisier, only add it when it is supported. Fixes: #22206
* | Merge topic 'nvhpc-ninja-depfile' into release-3.20Brad King2021-05-192-0/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | 364f6af1d7 NVHPC: Support Ninja dependency scanning 521cfc38a3 NVHPC: Support explicit language flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6136
| * | NVHPC: Support Ninja dependency scanningRobert Maynard2021-05-182-0/+10
| | | | | | | | | | | | Fixes: #22168
| * | NVHPC: Support explicit language flagsRobert Maynard2021-05-182-0/+8
| | |
* | | GNU: C++23 supportRaul Tambre2021-05-101-0/+2
| | | | | | | | | | | | | | | | | | | | | Added in GCC commit 78739c2df788ee5c868d998a6333d453317d8711, released in 11.1. No lettered variant beforehand this time around. Implements #22139.
* | | GNU: Final C++20 flagsRaul Tambre2021-05-101-1/+4
| | | | | | | | | | | | Added in GCC commit fb26050409473f5be54465beca114b7e48de43aa, released in 11.1.
* | | GNU: C++17 default versionRaul Tambre2021-05-101-1/+1
| | | | | | | | | | | | Changed in GCC commit 0801f419440c14f6772b28f763ad7d40f7f7a580, released in 11.1.
* | | Merge topic 'FindBoost-1.76' into release-3.20Brad King2021-05-101-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 79be37b94e FindBoost: Add support for Boost 1.76 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6100
| * | | FindBoost: Add support for Boost 1.76Brad King2021-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the list of known versions. Run the command cmake -DBOOST_DIR=/path/to/boost_1_76_0 \ -P Utilities/Scripts/BoostScanDeps.cmake to extract dependencies from the 1.76.0 source tree. They are the same as 1.75's dependencies, so just update the version check for warning about newer versions. Fixes: #22167
* | | | ExternalProject: Ensure git fetch if updating to hash we don't have yetCraig Scott2021-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ac6a4d4884 (ExternalProject: Improve robustness of update step, 2020-10-17), the method used to check whether we already have a commit or not was changed from using git rev-list to git rev-parse. The new logic assumed rev-parse would output nothing if given a commit hash it didn't know about, but it simply prints the hash again without raising an error in this scenario. Amend that logic by adding ^{commit} to the ref to ensure we do get an error if that ref is not currently known. Fixes: #22166
* | | | Merge topic 'improve_cuda_toolkit_extraction_regex' into release-3.20Brad King2021-05-073-3/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 5e931c5a97 CUDA: improve regex for CUDA Toolkit root from nvcc verbose output Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !6094
| * | | CUDA: improve regex for CUDA Toolkit root from nvcc verbose outputRobert Maynard2021-05-063-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original regular expression was greedy and would match any environment variable ending with `TOP` (like `DESKTOP`). This is an issue on windows where `nvcc -v` would output all environment variables before the compiler's verbose output. To resolve this issue we use a tighter match algorithm that looks for `#$ TOP=` instead of `TOP=`. Fixes: #22158
* | | BinUtils: Use more-private temporary variable namesBrad King2021-05-041-10/+12
|/ / | | | | | | | | | | | | | | | | | | Since commit 4d786dfcfa (BinUtils: Avoid clobbering a variable named without a private prefix, 2021-04-06, v3.20.1~4^2) we use variables named `_tool` and `_name`, but these may still be common enough to affect project code. Use `_CMAKE_TOOL` and `_CMAKE_TOOL_NAME` instead, and unset them when finished. Fixes: #22140
* | IntelLLVM: Add special case for ifx 2021.1 version extractionBrad King2021-04-281-0/+8
| | | | | | | | | | | | | | The ifx beta versions forgot to define `__INTEL_LLVM_COMPILER`, and instead define `__INTEL_COMPILER == 201900`. Add a special case. Issue: #22120
* | Intel: Update Classic compiler version detection for 2021Brad King2021-04-282-12/+30
| | | | | | | | | | | | | | The value of the `__INTEL_COMPILER` macro changed convention starting in version 2021. Fixes: #22120
* | Help: Do not recommend WCDH in cmake-compile-features(7)Brad King2021-04-231-0/+125
| | | | | | | | | | | | | | | | | | Since commit da7ad7997e (WriteCompilerDetectionHeader: Add policy to remove module, 2020-12-04, v3.20.0-rc1~350^2), the WCDH module is deprecated. Update the `cmake-compile-features(7)` manual section that previously recommended WCDH to make such detection the project's responsibility instead. Move the old content of the section over to the WCDH module to preserve it.
* | BinUtils: Restore toolchain prefix detection from compiler name 'c++'Lihua Zhao2021-04-161-1/+1
| | | | | | | | | | | | | | | | | | Since commit b12aec6c8d (BinUtils: prefer bin utils matching the compiler version extension, 2020-12-11, v3.20.0-rc1~171^2) we recognize `clangg++` and `g++` but not `c++`. Restore `[gc]` in place of `g` in the regex, as we had before that change. Fixes: #22069
* | Merge topic 'flags-with-backslash' into release-3.20Brad King2021-04-081-5/+6
|\ \ | | | | | | | | | | | | | | | | | | 3953dfcb31 Restore support for backslashes in initial language-wide flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5995
| * | Restore support for backslashes in initial language-wide flagsBrad King2021-04-071-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit bdc40742bd (CMakeDetermineCompilerId: Test without COMPILER_ID_FLAGS if REQUIRE_SUCCESS, 2021-02-27, v3.20.0-rc3~6^2) added an extra macro layer through which flag strings are passed. That caused an extra level of argument re-parsing, and broke flags with backslashes. Pass flags to the helper macro through variable names instead. Fixes: #22041
* | | Merge topic 'cuda-depfile-ccbin' into release-3.20Brad King2021-04-082-1/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8e38985db7 Makefiles: Fix dependency extraction with CUDA < 10.2 and host compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Raul Tambre <raul@tambre.ee> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Merge-request: !5992
| * | | Makefiles: Fix dependency extraction with CUDA < 10.2 and host compilerBrad King2021-04-072-1/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 2c71d051fa (Makefiles Generators: use compiler for dependencies generation, 2020-10-18, v3.20.0-rc1~392^2) we invoke `nvcc` for CUDA < 10.2 a second time in order to generate a depfile. When `CMAKE_CUDA_HOST_COMPILER` is set, the second invocation is missing its `-ccbin=` option, even after refactoring in commit 8981e3e7cc (NVIDIA-CUDA: rely on new capabilities for deps generation, 2020-12-02, v3.20.0-rc1~362^2). Ideally we should move the `-ccbin=` flag into `Compiler/NVIDIA-CUDA`, but that will add `CMAKE_CUDA_HOST_COMPILER` support on Windows in command-line generators but not the Visual Studio generators. For now, add the flag to the depfile command specifically. Fixes: #22037
* | | FindBLAS: Fix detection of OpenMP as dependency of BLA_STATICBrad King2021-04-071-2/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the change from commit f7f3d8987a (FindBLAS: Add dependency of OpenBLAS on OpenMP for BLA_STATIC, 2020-11-10, v3.20.0-rc1~492^2): * If C is not enabled, find CXX OpenMP libraries instead. * Do not use BLA_STATIC's custom CMAKE_FIND_LIBRARY_SUFFIXES for OpenMP. It can break projects that already call `find_package(OpenMP)` and expect a shared library. Whether OpenMP is static is orthogonal to whether BLAS is static. Fixes: #22039 Issue: #16221
* | Merge topic 'binutils-var-private' into release-3.20Brad King2021-04-071-10/+10
|\ \ | | | | | | | | | | | | | | | | | | 4d786dfcfa BinUtils: Avoid clobbering a variable named without a private prefix Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5986
| * | BinUtils: Avoid clobbering a variable named without a private prefixBrad King2021-04-071-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit b12aec6c8d (BinUtils: prefer bin utils matching the compiler version extension, 2020-12-11, v3.20.0-rc1~171^2) accidentally leaked a `TOOL` variable. Name temporary variables with a private prefix. Fixes: #22035
* | | Merge topic 'ios-rpath-linker-flag' into release-3.20Brad King2021-04-071-5/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 4aed96e230 Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5980
| * | | Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS tooCraig Scott2021-04-061-5/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since CMake 3.19, we no longer support macOS SDKs older than 10.5, which corresponds to Xcode 3. Supporting older Xcode versions for device platforms is also not realistic. We therefore expect the -rpath linker option should always be supported now. When targeting iOS, tvOS or watchOS, the previous disabling of -rpath support meant that the install_name_dir of shared libraries and frameworks was unable to use @rpath. This resulted in embedding absolute paths for their install_name. When they were embedded in an app bundle, this would cause the app to fail at runtime. By enabling the -rpath linker option, the default install_name_dir is now @rpath for these platforms, which results in binaries that do work at runtime. Fixes: #20036
* | | Merge topic 'nvhpc-lib-arch' into release-3.20Brad King2021-04-064-18/+52
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 764606e256 CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths 5d44d73bbe CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5984
| * | | CMakeDetermineCompilerABI: Extract lib arch from implicit object file pathsRobert Maynard2021-04-053-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NVHPC compiler does not have any implicit link directories that can be used to detect `CMAKE_LIBRARY_ARCHITECTURE`, but it does have implicit object files. Extract implicit object file paths from link lines and check them for the `CMAKE_LIBRARY_ARCHITECTURE` pattern. Issue: #22024
| * | | CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths"Robert Maynard2021-04-052-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in commit 657fc3a9a7 (CMakeDetermineCompilerABI: Parse library arch from versioned paths, 2021-02-03, v3.20.0-rc1~40^2) caused `CMAKE_LIBRARY_ARCHITECTURE` to be populated on non-multiarch platforms if their compilers happen to use `$arch/$version` library directories. Revert the use of versioned library paths. Fixes: #22024
* | | | Merge topic 'UseSWIG-policies' into release-3.20Brad King2021-04-061-15/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c3d0b25514 UseSWIG: Transform swig depfile to match Ninja generator paths 8c525d7e16 UseSWIG: Run using policy settings from includer Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5983
| * | | | UseSWIG: Transform swig depfile to match Ninja generator pathsBrad King2021-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 89b01b04fa (UseSWIG: use swig tool to generate dependencies, 2021-01-12, v3.20.0-rc1~120^2) we use a tool-provided depfile to extract dependencies under the Ninja generator. Enable `CMP0116` to ensure depfile paths are translated to match what the Ninja generator writes to the build manfiest. Fixes: #22029
| * | | | UseSWIG: Run using policy settings from includerMarc Chevrier2021-04-051-15/+8
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Backport commit de7f0aa6c0 (UseSWIG: avoid spurious policy warnings, 2021-02-11) to the 3.20 release branch. Projects need to be able to control policies. Issue: #22029
* | | | FindHDF5: search for the new Fortran HL library nameBen Boeckel2021-04-051-1/+1
|/ / / | | | | | | | | | | | | | | | | | | HDF5 1.10.6 renamed this library to match the other language binding library names. Fixes: #20205
* | | FindMPI: avoid host link options to be propagated to device link stepMarc Chevrier2021-04-011-3/+4
| | | | | | | | | | | | Fixes: #21887