Commit Graph

12881 Commits

Author SHA1 Message Date
Christoph Seitz
94df5b6ef1 Tasking: Add support for several compiler toolsets
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
2022-09-14 09:58:50 -04:00
Carlo Cabrera
a54e25b547 BinUtils: Avoid the 'ld.lld' ELF linker on Apple platforms
`ld.lld` is an ELF linker, so we should never set `CMAKE_LINKER` to this
when targeting an Apple platform.
2022-09-14 09:34:14 -04:00
Brad King
c3e68020d6 Merge topic 'MsvcDebugInformationFormatAbstraction'
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
2022-09-14 09:21:27 -04:00
Glen Chung
0e96a20478 MSVC: Add abstraction for debug information format
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
2022-09-14 09:12:47 -04:00
Brad King
e457663ac1 Merge topic 'Windows-Intel-dependencies'
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
2022-09-14 08:14:30 -04:00
Brad King
20f9b6973b Merge topic 'modules-use-new-try_compile-signature'
2edf0fc6d7 Modules: Use new keyword-dispatched try_compile signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7656
2022-09-14 08:13:27 -04:00
Matthew Woehlke
2edf0fc6d7 Modules: Use new keyword-dispatched try_compile signature
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.
2022-09-14 07:52:16 -04:00
Marc Chevrier
90874a542e Intel classic compilers on Windows: use msvc style dependencies
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
2022-09-13 17:47:01 +02:00
Brad King
d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables
Also avoid extra spaces in resulting flag strings.
2022-09-13 11:19:07 -04:00
Brad King
9ffd170d27 Merge topic 'FindMPI-more-robust-conditionals'
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
2022-09-13 09:49:06 -04:00
Brad King
4aeb887c82 Merge topic 'ExternalProject-cmake-install'
66b5d51f38 ExternalProject: Install CMake projects using 'cmake --install'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7655
2022-09-13 09:47:31 -04:00
Brad King
358a49ef9b Merge topic 'LINUX-host'
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
2022-09-13 09:46:01 -04:00
Harry Mallon
66b5d51f38 ExternalProject: Install CMake projects using 'cmake --install'
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
2022-09-12 09:53:22 -04:00
Brad King
64f4bb5728 Merge topic 'fetchcontent-redirect-version-exact'
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7665
2022-09-12 09:38:07 -04:00
Brad King
ef75657851 Merge topic 'fetchcontent-redirect-version-exact' into release-3.24
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7665
2022-09-12 09:38:06 -04:00
Brad King
db715b6632 Merge topic 'FortranCInterface-LLVMFlang'
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7658
2022-09-12 09:36:07 -04:00
Brad King
20f36aae14 Merge topic 'FortranCInterface-LLVMFlang' into release-3.24
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7658
2022-09-12 09:36:06 -04:00
Ben Boeckel
08dece8b18 FindMPI: remove unnecessary variable expansions in conditionals 2022-09-12 09:35:48 -04:00
Ben Boeckel
1edc2f337f FindMPI: match full language names when "simplifying"
There is no reason `CSharp` should go down this codepath (assuming it
ever gets here in the first place).
2022-09-12 09:34:16 -04:00
Ben Boeckel
93b5bdb8b4 FindMPI: quote literal values
Some projects accidentally end up doing the equivalent of `set(0 1)`
which makes things work very poorly here. Be more defensive.

See: #23954
2022-09-12 09:32:05 -04:00
Craig Scott
b9175800a2 Merge topic 'fetchcontent-unset-wrong-nested-var'
d9a6e0ffc8 FetchContent: Fix unsetting wrong variable name after provider returns

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7663
2022-09-11 18:09:11 -04:00
Craig Scott
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls
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
2022-09-11 18:36:31 +10:00
Craig Scott
d9a6e0ffc8 FetchContent: Fix unsetting wrong variable name after provider returns
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.
2022-09-10 18:23:21 +10:00
Cristian Adam
caffb15d09 LINUX: Set CMAKE_HOST_LINUX variable when running on a Linux host
Relates: #23840
2022-09-09 20:10:43 +02:00
Gilles Gouaillardet
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling
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.
2022-09-09 10:37:56 -04:00
Brad King
12de4ea2e8 Merge topic 'fphsa-error-message-empty-version-var'
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
2022-09-09 10:06:45 -04:00
Brad King
e71605dfb4 Merge topic 'BSD'
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
2022-09-09 10:05:41 -04:00
Marc Chevrier
281113af87 Merge topic 'useswig-perl-module'
5156eb5613 UseSWIG: track generated Perl module files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7654
2022-09-09 10:04:50 -04:00
Brad King
08930f76ef Merge topic 'fetchcontent-extra'
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
2022-09-09 09:53:41 -04:00
Mathieu Malaterre
629d106c5e Help: Fix typo in FetchContent example, extras should read extra
Amends 29e31e2825 (Packages: Integrate FetchContent and
find_package(), 2022-04-28)
2022-09-09 20:08:32 +10:00
Thomas Weißschuh
5156eb5613 UseSWIG: track generated Perl module files
This makes sure the generated file is cleaned properly and allows to
create dependencies on it.
2022-09-08 14:55:46 +02:00
Andrea Pappacoda
8f50f135ae FPHSA: Improve error message when VERSION_VAR is empty or has been unset()
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
2022-09-07 10:11:06 -04:00
Brad King
c3dafa24b2 Merge topic 'cpack-reuse-cmake-tools'
0c638ab597 CPack: re-use paths of tools discovered by CMakeFindBinUtils

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7635
2022-09-07 09:49:12 -04:00
Brad King
dae13c214f Merge topic 'cuda_support_sm90a'
234aa7e0aa CUDA: Support upcoming sm90a architecture

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7649
2022-09-07 09:48:25 -04:00
Brad King
8fe6d06c2c Merge topic 'zlib-windows-cross-compile-fix'
67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7647
2022-09-07 09:42:12 -04:00
Brad King
9a916eaae3 Merge topic 'zlib-windows-cross-compile-fix' into release-3.24
67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7647
2022-09-07 09:42:11 -04:00
Brad King
f6813c4159 Merge topic 'findCUDAToolkit_declare_deps_for_targets_once'
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7633
2022-09-07 09:38:01 -04:00
Brad King
6a2fd8439a Merge topic 'findCUDAToolkit_declare_deps_for_targets_once' into release-3.24
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7633
2022-09-07 09:38:00 -04:00
Robert Maynard
234aa7e0aa CUDA: Support upcoming sm90a architecture
The architecture values are being extended to have at time
a trailing `a`. This updates the CMake regex to support
this syntax.
2022-09-06 11:09:46 -04:00
Daniel Scharrer
67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty
CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES have
different behavior when undefined and when defined but empty:
Empty means to use an empty prefix/suffix while undefined means to
use a hardcoded default for the platform we are running on.

Unfortunately, set(a ${b}) will undefine a when b is empty,
meaning that when targeting a platform where either of these variables
is empty (e.g. Windows where CMAKE_FIND_LIBRARY_PREFIXES is empty)
the unpatched FindZLIB code ends up unsetting that variable, causing
all subsequent find_library calls to use the hardcoded default
for the runtime platform (e.g. "lib" for CMAKE_FIND_LIBRARY_PREFIXES
on Linux).

On the other hand, set(a "${b}") will always define a to be empty but
defined so we have to do this dance to fully preserve the state of these
variables.
2022-09-06 11:05:23 -04:00
Matteo Martelli
0c638ab597 CPack: re-use paths of tools discovered by CMakeFindBinUtils
`CMakeFindBinUtils.cmake` sets `CMAKE_<TOOL>` variables that in
cross-compilation environments point to the toolchain specific
executables: e.g. `CMAKE_OBJCOPY` might point to
`<path_to_toolchain>/arm-poky-linux-gnueabi-objcopy`.
Pass this information to CPack.
2022-09-06 09:49:54 -04:00
Brad King
5d80d7cb6a Merge branch 'findCUDAToolkit_declare_deps_for_targets_once' into release-3.23
Merge-request: !7633
2022-09-06 09:14:57 -04:00
Brad King
138337f53c Merge topic 'implicit-link-info-msvc'
93f2cd5b7c CMakeParseImplicitLinkInfo: Better detection of msvc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7619
2022-09-06 09:02:05 -04:00
Cristian Adam
1ea8b8ed86 BSD: Set CMAKE_HOST_BSD variable on a BSD host
Also the BSD variable will be set in CMake scripting mode (-P).

Relates: #23853
2022-09-06 01:15:44 +02:00
Cristian Adam
288f72efea BSD: Only use BSD as variable for target BSD system
Instead of having multiple boolean variables, we only have one
string variable: BSD with the name of the target BSD system.

Relates: #23853
2022-09-06 01:02:34 +02:00
Craig Scott
c14494f19f Merge topic 'doc-fetchcontent-gtest-example'
daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7644
2022-09-05 08:20:24 -04:00
Craig Scott
6fcdd5adcf Merge topic 'doc-fetchcontent-gtest-example' into release-3.24
daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7644
2022-09-05 08:20:23 -04:00
Craig Scott
9bbd5f71e9 Merge topic 'ExternalProject-default-git-tag'
2a21555ea7 ExternalProject: note the default of `GIT_TAG` being `master`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7631
2022-09-04 09:35:15 -04:00
Craig Scott
daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example 2022-09-04 17:18:09 +10:00
Robert Maynard
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies
Fixes #23920
2022-09-02 12:24:40 -04:00