summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | |
| * | | NVHPC-CXX: Add support for C++20Robert Maynard2021-08-051-0/+5
| | | |
* | | | Merge topic 'macos-10.4' into release-3.21Brad King2021-08-061-1/+3
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | 1af23c4de2 macOS: Restore support for Mac OS X 10.4 (Tiger) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6426
| * | 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.
* | | | CPackRPM: avoid a spurious `;` in the `%pre` and other sections with scriptsArtur Samarin2021-08-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was accidentally added by commit 34c8a23044 (CPackRPM: add scriplets tags only if scripts exist, 2021-04-01, v3.21.0-rc1~387^2). Fixes: #22501
* | | | NVHPC: Support 21.07 change to '-MD' where it behaves like gccRobert Maynard2021-07-293-10/+12
| | | |
* | | | Platform/Haiku: Remove the include-once behaviorJessica Hamilton2021-07-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior was added by commit 7ebc1cb2ff (Haiku: Several fixes to platform module, 2013-10-05, v3.0.0-rc1~541^2~3), but was not explained in its commit message. No other platform modules do this. The include-once behavior results in incorrect variables set in some larger projects, e.g. .NET Core, particularly when cross-compiling, `CMAKE_DL_LIBS` being one of these. Remove it.
* | | | FindXCTest: Fix output directory for test bundle with Xcode 12.5Yauheni Khnykin2021-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix from commit eafe740ead (FindXCTest: Fix output directory for test bundle with new build system, 2021-02-09, v3.19.5~5^2) is not necessary with Xcode 12.5, which seems to have changed/fixed the behaviour again. Fixes: #22462
* | | | Merge topic 'gnu_c23' into release-3.21Brad King2021-07-231-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d61bc4241d GNU: Correct C23 flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6376
| * | | | GNU: Correct C23 flagsRaul Tambre2021-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-final forms aren't supported yet, unlike C++23. Seems I might've gotten confused due to that when I added these. Fixes #22453.
* | | | | Merge topic 'iar-binutils' into release-3.21Brad King2021-07-233-86/+54
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | 5b9bfe738c IAR: Moved search logic to BinUtils. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6372
| * | | | IAR: Moved search logic to BinUtils.Jean-Marc Hengen2021-07-233-86/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The search logic for the IAR linker, librarian and related tools is moved from `Modules/Compiler/IAR-FindBinUtils.cmake` to `Modules/CMakeFindBinUtils.cmake` by introducing an new elseif block for the IAR toolchain. The search logic was refactored to omit repeating itself. Fixes: #22425
* | | | | CMakeDependentOption: Revert "Allow parentheses in the depends string"Brad King2021-07-201-4/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 0665d9092e (CMakeDependentOption: Allow parentheses in the depends string, 2021-06-13, v3.21.0-rc1~32^2). It broke existing use cases with parentheses in regular expressions. Also add a test for this. Fixes: #22447
* | | | Merge topic 'iar-exe-suffix' into release-3.21Brad King2021-07-201-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 09bc0785ee Help: Document CMAKE_EXECUTABLE_SUFFIX_<LANG> explicitly 05a3bafe65 Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIX Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6357
| * | | | Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIXLorenzo Cappelletti2021-07-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `CMAKE_EXECUTABLE_SUFFIX_<LANG>` instead. Fixes: #22426
* | | | | Compiler/IAR: search for both IAR's binaries * and *.exeLorenzo Cappelletti2021-07-201-8/+24
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IAR is available for both Linux and Windows OSes. Moreover, binaries `*.exe` could be called from a Linux box, or vice versa. See also commit 01a4eec446 (IAR: Changes required for Linux, 2019-04-25, v3.15.0-rc1~185^2). Fixes: #22312
* | | | CMakeDetermineCompilerId: Fix CMAKE_EXECUTABLE_FORMAT in CMP0126 NEW behaviorBrad King2021-07-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting `CMAKE_EXECUTABLE_FORMAT` as a normal variable is unnecessary because setting it as a cache entry already makes the value visible to the calling scope. Fixes: #22433
* | | | Merge topic 'enable_language-CMP0126' into release-3.21Brad King2021-07-199-0/+28
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3ddd7f3576 enable_language: Fix test for working compiler with CMP0126 NEW behavior Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6355
| * | | | enable_language: Fix test for working compiler with CMP0126 NEW behaviorBrad King2021-07-159-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the logic that converts a `try_compile` result from a cache entry to a normal variable to tolerate an existing normal variable under CMP0126 NEW behavior. Otherwise the `try_compile` result is ignored because CMake uses the false value of the normal variable, and CMake incorrectly reports that the compiler does not work. This went unnoticed for some languages (e.g. C and CXX) because the check for a working compiler is skipped if ABI detection works. It does affect other languages (e.g. CSharp). Fixes: #22423
* | | | | VS: Add CSharp VS 2022 compiler version and flag table v143Brad King2021-07-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the flag tables for C and C++ were generated from MSBuild `.xml` files, the CSharp flag tables were written by hand. Copy the `v142` flag table to use for the `v143` toolset.