summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'detect-lib_foo.a-msvc'Brad King2022-09-201-2/+2
|\ | | | | | | | | | | | | be848a71b0 MSVC: Teach find_library to consider the 'libfoo.a' naming convention Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7694
| * MSVC: Teach find_library to consider the 'libfoo.a' naming conventionYonggang Luo2022-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When targeting the GNU ABI, we consider `.a` libraries first but also accept `.lib`. For symmetry, when targeting the MSVC ABI, we now consider `.lib` first but also accept `.a`. This adds support for meson-generated static libraries, which are named with the pattern `lib${foo}.a`: * https://mesonbuild.com/FAQ.html#why-does-building-my-project-with-msvc-output-static-libraries-called-libfooa Fixes: #23975 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
* | Merge topic 'use-new-project-try_compile'Brad King2022-09-195-16/+17
|\ \ | | | | | | | | | | | | | | | | | | | | | d00d8537f6 Modules: Use new keyword-dispatched try_compile signature Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7690
| * | Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-165-16/+17
| |/ | | | | | | | | | | Modify modules that ship with CMake and use the project flavor of try_compile to use the new signature added by commit 56ae40cc59 (try_compile: Add PROJECT keyword-dispatched signature, 2022-09-14).
* | Merge topic 'android-clang-no-ndk-version'Brad King2022-09-191-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 1c86e397fe Android/Clang: Tolerate undefined CMAKE_ANDROID_NDK_VERSION Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7689
| * | Android/Clang: Tolerate undefined CMAKE_ANDROID_NDK_VERSIONBoris Egorov2022-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix for #21772, commit 005e2cdfb0 (Android: Do not use gold for ndk >= r22, 2021-02-26, v3.20.0-rc3~1^2), doesn't work with typical android toolchain file, like this one: https://android.googlesource.com/platform/ndk/+/master/build/cmake/android-legacy.toolchain.cmake The condition fails to work when CMAKE_ANDROID_NDK_VERSION is undefined: second part evaluates to true, although ndk version is not known. I've encountered following environment where CMAKE_ANDROID_NDK_VERSION is used without definition: * Build uses android toolchain file, which sets CMAKE_SYSTEM_VERSION=1 and doesn't set CMAKE_ANDROID_NDK_VERSION. * Code in Platform/Android-Determine.cmake exits early when it detects toolchain usage (via value CMAKE_SYSTEM_VERSION=1). This file is the only place in cmake modules where variable CMAKE_ANDROID_NDK_VERSION is set, and by early return we skip this definition.
* | | Merge topic 'matlab-r2022b'Brad King2022-09-191-0/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | edbdfba3f5 FindMatlab: add R2022b 9.13 version map Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7683
| * | FindMatlab: add R2022b 9.13 version mapMichael Hirsch2022-09-161-0/+1
| | |
* | | FPHSA: Fix regression when VERSION_VAR is missingBrad King2022-09-151-9/+13
| |/ |/| | | | | | | | | | | | | | | If a package is found but FPHSA is called by the find module without a `VERSION_VAR`, and the `find_package` call specifies a version, we have previously accepted the package as found. This was accidentally regressed by commit 8f50f135ae (FPHSA: Improve error message when VERSION_VAR is empty or has been unset(), 2022-08-01). Restore it and add a test case.
* | Merge topic 'add_tasking_compiler'Brad King2022-09-159-0/+225
|\ \ | | | | | | | | | | | | | | | | | | 94df5b6ef1 Tasking: Add support for several compiler toolsets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7491
| * | Tasking: Add support for several compiler toolsetsChristoph Seitz2022-09-149-0/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Tasking compiler toolset: * TriCore Compiler Toolset 6.3 (with TriCore, ARM, MCS, 8051 and PCP architecture compilers) * SmartCode Compiler Toolset 10.1 (with TriCore, ARC, MCS, 8051 architecture compilers) * ARM Compiler 6.0 * MCS Complier 3.3 * 8051 Compiler 7.2 Fixes: #23756
* | | Merge topic 'binutils-apple-no-lld'Brad King2022-09-151-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a54e25b547 BinUtils: Avoid the 'ld.lld' ELF linker on Apple platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7671
| * | | BinUtils: Avoid the 'ld.lld' ELF linker on Apple platformsCarlo Cabrera2022-09-141-1/+1
| |/ / | | | | | | | | | | | | `ld.lld` is an ELF linker, so we should never set `CMAKE_LINKER` to this when targeting an Apple platform.
* | | Merge topic 'FindMatlab-macos-arm64'Brad King2022-09-151-1/+5
|\ \ \ | | |/ | |/| | | | | | | | | | | | | f0edac914a FindMatlab: Add MEX binary file suffix for Apple Silicon native Matlab Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7673
| * | FindMatlab: Add MEX binary file suffix for Apple Silicon native MatlabMichael Hirsch2022-09-141-1/+5
| | | | | | | | | | | | The Matlab MEX binary file suffix is distinct for Apple Silicon.
| * | Merge topic 'fetchcontent-redirect-version-exact' into release-3.24Brad King2022-09-122-4/+10
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7665
| * \ \ Merge topic 'FortranCInterface-LLVMFlang' into release-3.24Brad King2022-09-122-3/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7658
* | \ \ \ Merge topic 'MsvcDebugInformationFormatAbstraction'Brad King2022-09-145-14/+65
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a858466aac MSVC: Add test for debug information format 0e96a20478 MSVC: Add abstraction for debug information format d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7606
| * | | | | MSVC: Add abstraction for debug information formatGlen Chung2022-09-145-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace our hard-coded default for `/Zi` with a first-class abstraction to select the debug information format an enumeration of logical names. We've long hesitated to do this because the idea of "debug information format" touches on related concepts on several platforms. Avoid that scope creep by simply defining an abstraction that applies only when targeting the MSVC ABI on Windows. Removing the old default flag requires a policy because existing projects may rely on string processing to edit them and choose a runtime library under the old behavior. Add policy CMP0141 to provide compatibility. Fixes: #10189
| * | | | | Clang/Windows: Clarify name of internal runtime library flags variablesBrad King2022-09-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Also avoid extra spaces in resulting flag strings.
* | | | | | Merge topic 'Windows-Intel-dependencies'Brad King2022-09-142-12/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 90874a542e Intel classic compilers on Windows: use msvc style dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !7668
| * | | | | | Intel classic compilers on Windows: use msvc style dependenciesMarc Chevrier2022-09-132-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel classic compilers generate erroneous dependencies when gcc style is used with paths containing spaces. So, fall back to the old way to generate dependencies by using option /showIncludes. Fixes: #23948
* | | | | | | Merge topic 'modules-use-new-try_compile-signature'Brad King2022-09-1436-78/+66
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2edf0fc6d7 Modules: Use new keyword-dispatched try_compile signature Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7656
| * | | | | | Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-1436-78/+66
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify most of the modules that ship with CMake to use the new try_compile / try_run signatures added by commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02). This improves debugging by each invocation using its own directory so that the results of multiple invocations can be retained. This does not cover any invocations which provide an entire project, as that flavor of try_compile has not yet been updated.
* | | | | | Merge topic 'FindMPI-more-robust-conditionals'Brad King2022-09-131-70/+70
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 08dece8b18 FindMPI: remove unnecessary variable expansions in conditionals 1edc2f337f FindMPI: match full language names when "simplifying" 93b5bdb8b4 FindMPI: quote literal values Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7666
| * | | | | | FindMPI: remove unnecessary variable expansions in conditionalsBen Boeckel2022-09-121-53/+53
| | | | | | |
| * | | | | | FindMPI: match full language names when "simplifying"Ben Boeckel2022-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason `CSharp` should go down this codepath (assuming it ever gets here in the first place).
| * | | | | | FindMPI: quote literal valuesBen Boeckel2022-09-121-19/+19
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some projects accidentally end up doing the equivalent of `set(0 1)` which makes things work very poorly here. Be more defensive. See: #23954
* | | | | | Merge topic 'ExternalProject-cmake-install'Brad King2022-09-131-4/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 66b5d51f38 ExternalProject: Install CMake projects using 'cmake --install' Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7655
| * | | | | | ExternalProject: Install CMake projects using 'cmake --install'Harry Mallon2022-09-121-4/+5
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, `cmake --install .` implements additional semantics over just `cmake --build . --target install`. For example, using the Xcode "new build system" with `IOS_INSTALL_COMBINED` requires special support from `cmake --install` beyond building the `install` target. Fixes: #23946
* | | | | | Merge topic 'LINUX-host'Brad King2022-09-131-0/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | caffb15d09 LINUX: Set CMAKE_HOST_LINUX variable when running on a Linux host Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: hinell <al.neodim@gmail.com> Merge-request: !7661
| * | | | | LINUX: Set CMAKE_HOST_LINUX variable when running on a Linux hostCristian Adam2022-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Relates: #23840
* | | | | | Merge topic 'fetchcontent-redirect-version-exact'Brad King2022-09-122-4/+10
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7665
| * | | | | FetchContent: Ignore EXACT for redirected find_package() callsCraig Scott2022-09-112-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When FetchContent_MakeAvailable() populates a dependency for which find_package() integration is enabled, all future calls to find_package() MUST succeed using the contents of the redirection directory. The generated config version file was not handling calls where the EXACT keyword was given, resulting in such calls rejecting the redirection directory's contents and continuing its search. It is not allowed to do that. Fix the generated file to also set PACKAGE_VERSION_EXACT to true so that calls with EXACT now accept it, as was originally intended. Fixes: #23950
* | | | | | Merge topic 'FortranCInterface-LLVMFlang'Brad King2022-09-122-3/+5
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7658
| * | | | | FortranCInterface: Add support for LLVMFlang manglingGilles Gouaillardet2022-09-092-3/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following `module.f90` file module mymodule contains subroutine mysub() end subroutine end module when compiled with `flang-new` (from LLVM 15.0.0) generate the `_QMmymodulePmysub` symbol. $ flang-new -c module.f90 $ nm module.o 0000000000000000 T _QMmymodulePmysub This commit fixes the regular expressions accordingly.
* | | | | Merge topic 'fetchcontent-unset-wrong-nested-var'Craig Scott2022-09-111-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| | | | | | | | | | d9a6e0ffc8 FetchContent: Fix unsetting wrong variable name after provider returns Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7663
| * | | FetchContent: Fix unsetting wrong variable name after provider returnsCraig Scott2022-09-101-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unset() command was using __cmake_contentNameLower before that variable was restored from the __cmake_fcCurrentVarsStack. That means if there had been a nested call to FetchContent_MakeAvailable(), the wrong variable name would have been cleared (the nested name instead of the one from the current call). That would have left the variable set upon return, blocking the dependency provider from seeing any further calls to FetchContent_MakeAvailable() in the current variable scope or below for the current dependency.
* | | Merge topic 'fphsa-error-message-empty-version-var'Brad King2022-09-091-2/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8f50f135ae FPHSA: Improve error message when VERSION_VAR is empty or has been unset() Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7527
| * | | FPHSA: Improve error message when VERSION_VAR is empty or has been unset()Andrea Pappacoda2022-09-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when `VERSION_VAR` is set but empty, FPHSA emitted a confusing error message, saying that the package was found but of an unsuitable version "". Fix the error message to state that the package was not found. Fixes: #23807
* | | | Merge topic 'BSD'Brad King2022-09-095-8/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1ea8b8ed86 BSD: Set CMAKE_HOST_BSD variable on a BSD host 288f72efea BSD: Only use BSD as variable for target BSD system Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7648
| * | | | BSD: Set CMAKE_HOST_BSD variable on a BSD hostCristian Adam2022-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also the BSD variable will be set in CMake scripting mode (-P). Relates: #23853
| * | | | BSD: Only use BSD as variable for target BSD systemCristian Adam2022-09-054-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having multiple boolean variables, we only have one string variable: BSD with the name of the target BSD system. Relates: #23853
* | | | | Merge topic 'useswig-perl-module'Marc Chevrier2022-09-091-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5156eb5613 UseSWIG: track generated Perl module files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7654
| * | | | | UseSWIG: track generated Perl module filesThomas Weißschuh2022-09-081-0/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | This makes sure the generated file is cleaned properly and allows to create dependencies on it.
* | | | | Merge topic 'fetchcontent-extra'Brad King2022-09-091-4/+4
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | | | | | | | | | 629d106c5e Help: Fix typo in FetchContent example, extras should read extra Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: hinell <al.neodim@gmail.com> Merge-request: !7657
| * | | Help: Fix typo in FetchContent example, extras should read extraMathieu Malaterre2022-09-091-4/+4
| | | | | | | | | | | | | | | | | | | | Amends 29e31e2825a (Packages: Integrate FetchContent and find_package(), 2022-04-28)
| * | | Merge topic 'zlib-windows-cross-compile-fix' into release-3.24Brad King2022-09-071-4/+20
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7647
| * \ \ \ Merge topic 'findCUDAToolkit_declare_deps_for_targets_once' into release-3.24Brad King2022-09-071-17/+20
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7633
| * \ \ \ \ Merge topic 'doc-fetchcontent-gtest-example' into release-3.24Craig Scott2022-09-051-2/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7644