summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* FindCUDAToolkit: Fix nvrtc_builtins library nameTomoharu Kitawaki2023-07-201-1/+1
| | | | | | | | | The lib is named `libnvrtc-builtins.so`, not `libnvrtc_builtins.so`. Update the change from commit 2a94c762ed (FindCUDAToolkit: Add support for CUDA::nvrtc_static, 2023-01-20, v3.26.0-rc1~55^2). Apply a fix similar to commit 9688a8ebc2 (FindCUDAToolkit: Fix `nvrtc_builtins_static` library name, 2023-02-03, v3.26.0-rc2~15^2).
* ARMClang: Fix computation of compiler semantic version patch levelDaniel Brondani2023-07-181-1/+1
| | | | | | According to ARMClang documentation 6.20, the patch version number should not include the last two digits of `__ARMCOMPILER_VERSION`, which are reserved for internal use by ARM.
* CMakeDetermineCompilerABI: Avoid removing the flag after -WerrorRaul Tambre2023-05-301-1/+1
| | | | | | | | | | | The matching became too eager after commit 079ea66468 (CMakeDetermineCompilerABI: Handle NVCC-style -Werror flags, 2020-10-04, v3.19.0-rc1~45^2). When -Werror was specified without a value we would eat the following flag. Prevent this by disallowing "-" as the first character of the flag's value. Fixes: 079ea66468a6ffe0b02c3d6622bc0230fdf455b0 See-also: https://discourse.cmake.org/t/8230
* Merge topic 'FindPython-fix-launcher-typo' into release-3.26Brad King2023-05-181-1/+1
|\ | | | | | | | | | | | | 31faf3945f FindPython: fix interpreter launcher variable spelling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8487
| * FindPython: fix interpreter launcher variable spellingBen Boeckel2023-05-171-1/+1
| | | | | | | | Reported-by: Johannes (#cmake Slack)
* | Ninja: Restore detection of msvc-wine showIncludes prefixBrad King2023-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8f82e755f3 (Ninja: Fix detection of MSVC showIncludes prefix in Italian, 2023-01-26, v3.26.0-rc1~20^2) our regex no longer matches the output from `msvc-wine`, which uses forward slashes: Note: including file: /path/to/foo.h `cl /showIncludes` under Wine prints paths of the form `Z:\path\to\file`, but the `msvc-wine` wrapper converts them to the form `/path/to/file` so that native Ninja can be used. Update our regex to match the prefix followed by a path with a leading forward slash. Fixes: #24908
* | FindCUDAToolkit: Support CUDA version extraction from version.jsonRobert Maynard2023-05-041-22/+56
| | | | | | | | Fixes: #24858
* | Merge topic 'findjni_new_ubuntu_versions' into release-3.26Brad King2023-05-021-0/+7
|\ \ | | | | | | | | | | | | | | | | | | 7f738313e0 FindJNI: add Ubuntu specific paths for more recent JDK versions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8449
| * | FindJNI: add Ubuntu specific paths for more recent JDK versionsEven Rouault2023-05-011-0/+7
| | |
* | | Merge topic 'FindCUDAToolkit-static-deps' into release-3.26Brad King2023-04-261-1/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 1d6c343661 FindCUDAToolkit: Add missing static library dependencies on pthread and libdl Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8422
| * | | FindCUDAToolkit: Add missing static library dependencies on pthread and libdlRobert Maynard2023-04-261-1/+5
| | | | | | | | | | | | | | | | Discourse-topic: https://discourse.cmake.org/t/7946
* | | | FindCUDAToolkit: Fix nvrtc_static dependencies on WindowsRobert Maynard2023-04-251-1/+6
|/ / / | | | | | | | | | | | | | | | Required for CUDA toolkit 11.5: * https://docs.nvidia.com/cuda/archive/11.5.0/nvrtc/index.html#build-instruction
* | | Merge topic 'FindCUDAToolkit-nvptxcompiler_static-deps' into release-3.26Brad King2023-04-061-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 8711231739 FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8395
| * | | FindCUDAToolkit: nvptxcompiler_static correctly specify dependenciesRobert Maynard2023-04-051-1/+1
| | |/ | |/| | | | | | | Avoids linking to `Threads::Threads` on non-unix systems where it isn't needed. In addition ensures that dlopen symbols are resolved.
* | | FindCUDAToolkit: Add dependency between cusparse and nvJitLinkRobert Maynard2023-04-051-6/+9
|/ / | | | | | | Starting in CUDA 12.0 cusparse uses nvJitLink. As part of verifying this PR I also corrected the nvJitLink dependencies
* | Merge topic 'swift-xcode-14.3' into release-3.26Brad King2023-04-041-4/+8
|\ \ | | | | | | | | | | | | | | | 52dbfefe0d Xcode: Fix detection of Swift compiler location for Xcode 14.3 Merge-request: !8388
| * | Xcode: Fix detection of Swift compiler location for Xcode 14.3Brad King2023-04-031-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we tried to match output from `xcodebuild` to detect the path to the `swiftc` tool. This approach is used for C and CXX for historical reasons, but is unnecessary for Swift. We know the name of the tool, so we can just ask `xcrun --find swiftc`. Fixes: #24666
* | | Merge topic 'vs-fortran-try_compile' into release-3.26Brad King2023-04-031-1/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 4da50fe3f4 VS: Remove extra try_compile argument in Intel Fortran check Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8383
| * | | VS: Remove extra try_compile argument in Intel Fortran checkBrad King2023-03-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit d00d8537f6 (Modules: Use new keyword-dispatched try_compile signature, 2022-09-16, v3.25.0-rc1~115^2) accidentally left one of the old signature arguments behind, causing a warning.
| * | | CompilerId: Restore logging of failed identifications in CMake 3.25Brad King2023-03-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in commit 9c5bd7fe3a (CompilerId: Output errors from all attempts at detection, 2022-08-16, v3.25.0-rc1~290^2) accidentally stopped logging failed compiler identification build output. This was fixed for CMake 3.26 and later by commit 24ccc8c3c9 (CompilerId: Restore logging of failed identifications, 2023-01-16, v3.26.0-rc1~70^2~6). Backport it to 3.25.
| * | | Merge branch 'GoogleTest-type-param-suite' into release-3.25Brad King2023-03-031-1/+1
| |\ \ \ | | |/ / | | | | | | | | Merge-request: !8282
* | | | Swift: Restore compatibility with old C++ driverYR Chen2023-03-283-3/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `-wmo` flag added by commit 6063428de7 (Swift: Update default build flags, 2022-10-03, v3.26.0-rc1~585^2~1) behaves differently with the old driver. Detect when the old driver is being used, and avoid adding that flag. Fixes: #24641
* | | | FindHDF5: Restore parallel HDF5 detection with only CXX enabledBrad King2023-03-221-38/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 14c46fb16a (FindHDF5: Find C component with only CXX compiler, 2022-12-13, v3.26.0-rc1~175^2), if CXX is enabled but C is not, the `_HDF5_test_regular_compiler_C` helper writes a `.cpp` source but the `_HDF5_invoke_compiler` still expects a `.c` source. Refactor the logic to select a name for the source file up front, and use it in both helpers. Fixes: #24627 Issue: #24241
* | | | Merge topic 'clang-windows-cxx-modules' into release-3.26Brad King2023-03-211-13/+15
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end 6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows 8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8346
| * | | | Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-endBrad King2023-03-201-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The settings added by commit 3fe8e33f27 (Clang: Record Clang 16.0 flags for our experimental C++ modules support, 2023-03-03, v3.26.0-rc6~6^2) work only for the GNU-like `clang++` front-end, and not for the MSVC-like `clang-cl` on Windows. Also quote the path to `clang-scan-deps` to support spaces in its path. Issue: #24611
* | | | | Merge topic 'clang-cl-showIncludes' into release-3.26Brad King2023-03-211-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 843fc607de Ninja: Restore detection of clang-cl showIncludes prefix 3346570ae9 Tests: Comment RunCMake.Ninja ShowIncludes sample input languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8344
| * | | | | Ninja: Restore detection of clang-cl showIncludes prefixYR Chen2023-03-201-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8f82e755f3 (Ninja: Fix detection of MSVC showIncludes prefix in Italian, 2023-01-26, v3.26.0-rc1~20^2) our regex no longer matches the output from `clang-cl`, which uses a relative path, forward slashes, and is always in English [1]: Note: including file: ./foo.h Update the regex to match that too. [1] https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/clang/lib/Frontend/HeaderIncludeGen.cpp#L102 Co-authored-by: Brad King <brad.king@kitware.com>
* | | | | FindPython: ensure Stable ABI is correctly handledMarc Chevrier2023-03-202-2/+2
|/ / / / | | | | | | | | | | | | Fixes: #24610
* | | | Merge topic 'CMakePackageConfigHelpers-ARCH_INDEPENDENT' into release-3.26Brad King2023-03-171-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6988ddf8ac WriteBasicConfigVersionFile: Fix regression in ARCH_INDEPENDENT check Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8337
| * | | | WriteBasicConfigVersionFile: Fix regression in ARCH_INDEPENDENT checkBrad King2023-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 77982de955 (CMakePackageConfigHelpers: only emit arch check if needed, 2023-01-29, v3.26.0-rc1~16^2) did not correctly preserve the check for empty `CMAKE_SIZEOF_VOID_P`. Fix it. The difference between the version files generated before and after is: -if(CMAKE_SIZEOF_VOID_P STREQUAL "" OR "8" STREQUAL "") +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") This restores the check generated before the above-mentioned commit. Fixes: #24608
* | | | | FindMatlab: add version/release map for R2023ascivision2023-03-161-0/+1
|/ / / /
* | | | CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'Brad King2023-03-133-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 5b45a3d0ce (CheckCompilerFlag: Match the Clang "argument unused" output for all languages, 2023-01-23, v3.26.0-rc1~38^2). It broke existing projects that were silently tolerating unrelated unused arguments in their checks for C and CXX. For example, using `CFLAGS=-nostdinc` or `CXXFLAGS=-nostdinc++` causes those flags to be used when driving the linker as well, and Clang warns they are unused in that case. Add a test case covering the now-restored behavior. Fixes: #24591
* | | | Merge topic 'clang-16-cxx-modules' into release-3.26Brad King2023-03-061-0/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: scivision <michael@scivision.dev> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !8285
| * | | | Clang: Record Clang 16.0 flags for our experimental C++ modules supportBrad King2023-03-031-0/+14
| | | | | | | | | | | | | | | | | | | | LLVM/Clang 16.0 now contains official support for what CMake needs.
* | | | | Merge topic 'GoogleTest-type-param-suite' into release-3.26Brad King2023-03-061-1/+1
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| | | | | | | | | | 9aa9032266 GoogleTest: Restore suite name for type-parametrized tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8282
| * | | GoogleTest: Restore suite name for type-parametrized testsBrad King2023-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a regression from commit 073dd1bd81 (GoogleTest: Change format for typed tests, 2022-02-07, v3.23.0-rc1~4^2) in the suite name detection. Co-authored-by: Evgeniy Shcherbina <ixsci@pm.me> Fixes: #24563
* | | | Merge topic 'ExternalProject-revert-install' into release-3.26Brad King2023-03-031-5/+4
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 771387523a ExternalProject: Restore driving install through build system Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Craig Scott <craig.scott@crascit.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8279
| * | | ExternalProject: Restore driving install through build systemBrad King2023-03-021-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 66b5d51f38 (ExternalProject: Install CMake projects using 'cmake --install', 2022-09-08, v3.25.0-rc1~150^2). It changed the ExternalProject install step command from: cmake --build <dir> --target install --config <cfg> to: cmake --install <dir> --config <cfg> The latter command no longer runs the external project build system during the install step. We could consider using the commands: cmake --build <dir> --target all --config <cfg> cmake --install <dir> --config <cfg> as the install step, but if `CMAKE_SKIP_INSTALL_ALL_DEPENDENCY` is used in the external project, that can change semantics too. Revert the original change pending further investigation on other ways to support its motivating use case. Add a test covering the previously-regressed use case. Fixes: #24567 Issue: #23946
* | | | FindPython: fix erroneous ${CMAKE_SHARED_LIBRARY_SUFFIX} matchingMarc Chevrier2023-03-011-3/+3
| | | | | | | | | | | | | | | | Fixes: #24556
* | | | FindOpenSSL: Search for -pthread flagKyle Edwards2023-02-231-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because -pthread doesn't begin with -l, it doesn't show up in the pkgconfig LIBRARIES variable, causing FindOpenSSL to not add the Threads::Threads dependency. Explicitly search LDFLAGS_EXTRA for -pthread and add the dependency if it's found. Fixes: #24532
* | | | Merge topic 'BundleUtilities-chmod-later' into release-3.26Brad King2023-02-211-4/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1430f7f574 BundleUtilities: Avoid unnecessary chmod in fixup_bundle_item Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8232
| * | | | BundleUtilities: Avoid unnecessary chmod in fixup_bundle_itemBrad King2023-02-201-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the permissions modification added by commit 88fed668b1 (Make bundle items writable before fixup, 2010-09-07, v2.8.3~129^2) inside the condition added by commit 45ed314bff (BundleUtilities: do not run install_name_tool on scripts, 2020-07-27, v3.19.0-rc1~404^2). There is no reason to add write permissions to a file that we are not going to modify. Fixes: #24424
* | | | | FindOpenSSL: Fix regression in dependency on threadsBrad King2023-02-201-6/+14
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1b7804edd0 (FindOpenSSL: use extra dependencies from pkg-config as well, 2022-12-05, v3.26.0-rc1~227^2) we conditionally find Threads but unconditionally depend on it. Make the conditions consistent. Fixes: #24505
* | | | LLVMFlang: Fix post-preprocess compile for fixed-form FortranDavid Truby2023-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM Flang's preprocessor output is always valid fixed form Fortran with a fixed line length of 72. If an application tries to use fixed form with a different line length, this will fail in the post-preprocessing compilation step as they will pass a flag asking for a different fixed line length. To fix this we can pass -ffixed-line-length-72 to the post-preprocess compilation stage. This will be ignored when the input is free form Fortran, and force to a 72 line length when the input is fixed.
* | | | LCC: Fix extraction of __LCC__ version componentsBrad King2023-02-132-8/+4
| | | | | | | | | | | | | | | | | | | | Previously the logic only worked for major versions of the form `1.xx`. Fix it to work with versions `2.xx` and above.
* | | | Merge topic 'findopenssl-static-findpkg-fix' into release-3.26Brad King2023-02-081-2/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 652f34eab9 FindOpenSSL: Use static pkgconfig if OPENSSL_USE_STATIC_LIBS=ON Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8174
| * | | | FindOpenSSL: Use static pkgconfig if OPENSSL_USE_STATIC_LIBS=ONKyle Edwards2023-02-071-2/+8
| | | | | | | | | | | | | | | | | | | | Fixes: #24395
* | | | | FetchContent: Bump documented example Catch2 to v3.0.1Eisuke Kawashima2023-02-071-3/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | The previous Catch2 v2.13.4 does not compile on some platforms [1]. [1] https://github.com/catchorg/Catch2/issues/2326
* | | | Merge topic 'android-ndk-legacy-toolchain' into release-3.26Brad King2023-02-072-1/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | cb0b9452e8 Android: Provide CMAKE_ANDROID_NDK_VERSION with NDK legacy toolchain file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8170
| * | | Android: Provide CMAKE_ANDROID_NDK_VERSION with NDK legacy toolchain fileBrad King2023-02-062-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This variable has been provided since commit 746906242d (Android: Detect NDK version number, 2021-02-26, v3.20.0-rc3~1^2~3) when using CMake's NDK support or the modern NDK toolchain file. Since commit 005e2cdfb0 (Android: Do not use gold for ndk >= r22, 2021-02-26, v3.20.0-rc3~1^2) we need the value in our compiler/platform information files, so provide it when using the NDK legacy toolchain file too. Revert commit 1c86e397fe (Android/Clang: Tolerate undefined CMAKE_ANDROID_NDK_VERSION, 2022-09-16, v3.25.0-rc1~118^2) since the variable should now always be defined. Issue: #21772 Fixes: #24386