1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Commit Graph

11700 Commits

Author SHA1 Message Date
Brad King
7470ee3e05 Merge topic 'cuda-rules-override'
1d9009c27a CUDA: Implement CMAKE_USER_MAKE_RULES_OVERRIDE[_CUDA]

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6253
2021-06-23 08:55:27 -04:00
Seth R Johnson
1d9009c27a CUDA: Implement CMAKE_USER_MAKE_RULES_OVERRIDE[_CUDA]
This is implemented by other languages, and is documented for
all languages.  This was accidentally left out of CUDA.
2021-06-22 09:59:01 -04:00
Brad King
7d0018bd8e Merge topic 'ep-git-update-commit-ref'
360ff17dc6 ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6249
2021-06-21 10:03:37 -04:00
Brad King
b948b46668 Merge topic 'ep-git-update-commit-ref' into release-3.21
360ff17dc6 ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6249
2021-06-21 10:03:36 -04:00
Brad King
69b64ed85a Merge topic 'GNUInstallDirs-alpine'
37b24e0bed GNUInstallDirs: don't use lib64 on Alpine Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6244
2021-06-21 09:56:49 -04:00
Brad King
ed5bd39baa Merge topic 'GNUInstallDirs-alpine' into release-3.21
37b24e0bed GNUInstallDirs: don't use lib64 on Alpine Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6244
2021-06-21 09:56:48 -04:00
Brad King
a01a88dc95 Merge topic 'FindPkgConfig-PKG_CONFIG-args'
35d3e00e4e FindPkgConfig: split args if loaded from environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6222
2021-06-21 09:53:51 -04:00
Brad King
cbdd6747ad Merge topic 'msvc-isystem'
f29e1874ad Compiler/MSVC: use the `-external:I` flag for system includes
5a5c85dffd Tests/IncludeDirectories: support MSVC in system include tests
399a3204bb Tests/IncludeDirectories: align sibling predicates
20ab49193b Tests/IncludeDirectories: factor out applying flags to targets
809f7b0c3a Tests/IncludeDirectories: fix copy pasta for otherlib
b094324948 Tests/IncludeDirectories: Include system headers via angle brackets
8f63f3b04e cmVisualStudio10TargetGenerator: remove unused variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Julien Waechter <greenjava@gmail.com>
Acked-by: DE-VS wenglor <devs.wenglor@gmail.com>
Merge-request: !4766
2021-06-21 09:50:52 -04:00
Craig Scott
360ff17dc6 ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutions
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
2021-06-20 15:40:45 +10:00
Natanael Copa
37b24e0bed GNUInstallDirs: don't use lib64 on Alpine Linux
Fixes: #22318
2021-06-18 11:16:18 -04:00
Christopher Degawa
35d3e00e4e FindPkgConfig: split args if loaded from environment
It's common for some people to use the PKG_CONFIG environment variable
to not only load a custom pkg-config/pkgconf but also to load some
default arguments such as `--static` or `--keep-system-libs` which often
worked since shell scripts would call `$PKG_CONFIG --libs pkg` without
quotes, but this breaks FindPkgConfig since it uses the full string as
`argv[0]` and might try looking for a binary called `pkgconf --static`,
instead of looking for `pkgconf` and adding `--static` as the `argv[1]`

Additionally adds RunCMake.FindPkgConfig ARGN test case

Fixes: #22305
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2021-06-18 11:10:12 -04:00
Ben Boeckel
f29e1874ad Compiler/MSVC: use the -external:I flag for system includes
See: #17904
2021-06-18 09:54:17 -04:00
Philippe Canal
c8eb357738 CompilerId: Tolerate variables named for languages
If a project or user sets a variable or cache entry named `C`, `CXX`,
`CUDA`, `Fortran`, `CSharp`, or `ISPC`, we were previously comparing
each enabled language name to the value of that variable, rather than
the name itself.  Double-quote the string to take advantage of policy
`CMP0054`, but also add "x" prefixes to support projects that do not set
the policy.

This extends a similar fix in commit bd16a985fc (CompilerId/Features:
Tolerate variables named for languages, 2021-04-28) in more places.  In
particular, ensure that we consider the proper list of compiler ids.

Issue: #22125
2021-06-18 09:41:08 -04:00
Marc Aldorasi
701773f1da CheckCompilerFlag: Handle -Werror= for GCC 11 2021-06-17 13:39:48 -04:00
Brad King
b642022046 AppleClang: Add flags for C17 and C23
Follow up commit 72f4984cdc (Clang: C23 support, 2021-02-07).
2021-06-16 15:50:55 -04:00
Steven A White
d3274e0a6f FindLATEX: Search user-local MiKTeX locations
I've noticed the default installer for MikTex does not prompt for
escalation.  So, many installations I find do not have registry entries.
This should cover finding it in the current defaults.
2021-06-16 08:25:34 -04:00
Daniel Schürmann
0665d9092e CMakeDependentOption: Allow parentheses in the depends string
`if()` takes the condition as a list of arguments.
Parentheses need to be separated as well.

Fixes: #22303
2021-06-14 13:45:49 -04:00
Brad King
6b218d2e26 Merge topic 'objc-std-17-23'
e8dc95ae1e ObjectiveC: Add C17 and C23 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6219
2021-06-14 09:49:22 -04:00
Brad King
13b40c1ea2 Merge topic 'FindBLAS-LAPACK-docs'
5bf1651452 Find{BLAS,LAPACK}: Revise and extend Intel MKL usage documentation
8585a12bd9 Find{BLAS,LAPACK}: Move enabled language requirement to top of documentation
6a7c055f96 Find{BLAS,LAPACK}: Revise formatting of intro docs
43b581367d Find{BLAS,LAPACK}: Move implementation note from docs to comments
3beac78a13 Find{BLAS,LAPACK}: Revise imported targets documentation layout
6f305cd5fd Find{BLAS,LAPACK}: Factor out vendor documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6218
2021-06-14 09:48:37 -04:00
Gregor Jasny
e8dc95ae1e ObjectiveC: Add C17 and C23 support
Issue: #22297
2021-06-11 14:47:23 +02:00
Brad King
5bf1651452 Find{BLAS,LAPACK}: Revise and extend Intel MKL usage documentation
Fixes: #22295
2021-06-11 08:41:25 -04:00
Brad King
8585a12bd9 Find{BLAS,LAPACK}: Move enabled language requirement to top of documentation 2021-06-11 08:40:37 -04:00
Brad King
6a7c055f96 Find{BLAS,LAPACK}: Revise formatting of intro docs 2021-06-11 08:02:59 -04:00
Brad King
43b581367d Find{BLAS,LAPACK}: Move implementation note from docs to comments 2021-06-11 08:00:22 -04:00
Brad King
3beac78a13 Find{BLAS,LAPACK}: Revise imported targets documentation layout 2021-06-11 07:58:15 -04:00
Brad King
6f305cd5fd Find{BLAS,LAPACK}: Factor out vendor documentation
Move the list of vendors to a dedicated section shared by both modules.
Format it as a definition list.
2021-06-11 07:51:37 -04:00
Peter Knowles
130fa72bb3 Find{BLAS,LAPACK}: Update for Intel oneAPI structure under MKLROOT
Add search paths for the Intel oneAPI MKL directory structure
so that we do not rely on paths in `LD_LIBRARY_PATH`.
2021-06-11 06:55:09 -04:00
Brad King
4217e1cf3a Merge topic 'FindBLAS-mkl-gnu'
daa0a1f877 Find{BLAS,LAPACK}: Add tests covering Intel MKL with GNU compiler
624110b90d FindBLAS: Revert "Do not statically link against iomp5 ... Intel MKL"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6213
2021-06-11 06:05:54 -04:00
Brad King
624110b90d FindBLAS: Revert "Do not statically link against iomp5 ... Intel MKL"
Since commit 20ab504591 (FindBLAS: Do not statically link against iomp5
in the case of Intel MKL, 2021-04-11), we no longer find MKL's BLAS when
using the GNU compiler because FindOpenMP chooses libgomp instead of
libiomp5, and mkl_intel_thread depends on the latter.  Revert the change
for now.  A new approach will be needed to solve the original problem.

Issue: #21811
2021-06-10 12:39:00 -04:00
Brad King
3394dcb64f Merge topic 'irsl-intel-oneapi-windows'
6d4c51c29e IRSL: Add Intel oneAPI redist location on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6199
2021-06-09 07:56:28 -04:00
Brad King
7aad9e8685 Merge topic 'add_hip_language'
8514ee9b31 HIP: analyze output of `hipcc` to determine default GPU architecture
20d086f1a2 HIP: All HIP tests now run on CMake's current AMD hardware
2e86e50c2f HIP: Add HIP to all the Check* modules
947dbed0aa HIP: Automatically inject the `hip::device` runtime target
b50bfc8913 HIP: Add language to CMake
ff0d2858e1 HIP: Extract clang compiler details from hipcc
bd844387df ROCMClang: Add the ROCm toolkit derived clang compiler to CMake
590553f322 Compilers: protect use of  __has_include
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !6121
2021-06-09 07:53:32 -04:00
Brad King
6d4c51c29e IRSL: Add Intel oneAPI redist location on Windows
Fixes: #22283
2021-06-08 09:07:37 -04:00
Brad King
df1398aa97 Merge topic 'openssl-static'
98fa09d5be FindOpenSSL: Link with ws2_32 and crypt32 on Windows/static

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6197
2021-06-08 08:05:37 -04:00
Brad King
105e108836 Merge topic 'cpack-deb-minor-fixes'
ed1f3a5fa5 CPackDeb: output the error message when no description can be made
ece24b343a Help/cpack_gen/freebsd: improve wording for Debian fallbacks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !6196
2021-06-08 08:01:44 -04:00
Brad King
34eefc6ea3 Merge topic 'FindPkgConfigAlwaysAddTarget'
6f14205e08 FindPkgConfig: Always create the imported target
07d6390728 Tests: Add case covering FindPkgConfig creation of empty targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6113
2021-06-08 08:00:24 -04:00
Zack Galbreath
8514ee9b31 HIP: analyze output of hipcc to determine default GPU architecture 2021-06-07 19:25:34 +00:00
Robert Maynard
2e86e50c2f HIP: Add HIP to all the Check* modules 2021-06-07 19:25:33 +00:00
Robert Maynard
947dbed0aa HIP: Automatically inject the hip::device runtime target
Any target that might need to link to hip code needs the `hip::device`
target
2021-06-07 19:25:33 +00:00
Robert Maynard
b50bfc8913 HIP: Add language to CMake 2021-06-07 19:25:33 +00:00
Robert Maynard
ff0d2858e1 HIP: Extract clang compiler details from hipcc 2021-06-07 19:25:33 +00:00
Robert Maynard
bd844387df ROCMClang: Add the ROCm toolkit derived clang compiler to CMake 2021-06-07 19:25:28 +00:00
Zack Galbreath
590553f322 Compilers: protect use of __has_include
If the compiler does not have __has_include, pretend the answer is always no
2021-06-07 19:25:09 +00:00
Brad King
79e3c6221a Merge topic 'FindBoost-json-header'
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
2021-06-07 13:22:04 -04:00
Brad King
f092fe677f Merge topic 'FindBoost-json-header' into release-3.20
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
2021-06-07 13:22:03 -04:00
Orgad Shaneh
98fa09d5be FindOpenSSL: Link with ws2_32 and crypt32 on Windows/static 2021-06-07 19:23:13 +03:00
Ben Boeckel
ed1f3a5fa5 CPackDeb: output the error message when no description can be made
The `message` command does not support automatic dereferencing.
2021-06-07 07:11:44 -04:00
John Drouhard
c44dfdfdbb FindBoost: Add check for json component header in Boost 1.75+
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.
2021-06-04 13:43:54 -04:00
Adam Badura
6f14205e08 FindPkgConfig: Always create the imported target
Fixes: #22180
2021-06-04 08:33:27 -04:00
Brad King
1d7fddca8e CMakeParseImplicitLinkInfo: Honor GNU static runtime library flags
With flags like `-static-libstdc++` or `-static-libgfortran`, the GNU
compiler driver adds `-Bstatic ... -Bdynamic` around its language
runtime library.  Convert the libraries in between these to absolute
paths so that mixed-language linking honors the static runtime
libraries.
2021-06-03 08:12:58 -04:00
Brad King
b25225bb61 Merge topic 'msvc_cxx20_23'
886e27062b Clang/MSVC: C++20 final flag, C++23 support
3aaf1d91bf MSVC: C++20 final flag, C++23 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !6174
2021-06-02 07:32:30 -04:00