Commit Graph

53663 Commits

Author SHA1 Message Date
Craig Scott 7b5fa0f7b4 Help: Make policy CMP0126 wording more accurate
The OLD behavior only removes a non-cache variable of the same
name in specific circumstances. The previous wording implied
that it would always occur.

Also add a note about the behavior compared to the analogous
CMP0077 policy, which affects the option() command in a similar
but subtly different way.
2021-07-17 17:18:22 +10:00
Craig Scott c4bc250f8c Help: Explain policy CMP0125 in more detail 2021-07-17 16:43:25 +10:00
Craig Scott 6d5f74fcd7 Help: Clarify wording of CMP0124 2021-07-17 16:43:25 +10:00
Brad King 7c6234dd21 Merge topic 'ci-use-3.21.0' into release-3.21
79e139e3d3 ci: use CMake 3.21.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6349
2021-07-15 10:54:39 -04:00
Ben Boeckel 79e139e3d3 ci: use CMake 3.21.0 2021-07-14 13:25:51 -04:00
Brad King ff7a2e37bf CMake 3.21.0 v3.21.0 2021-07-14 10:10:23 -04:00
Brad King 80ca30704f Merge topic 'armlink_armar_detection' into release-3.21
509ef50a06 ARMClang: Fix regression in check for working compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6346
2021-07-14 10:06:29 -04:00
Lingkai Dong 509ef50a06 ARMClang: Fix regression in check for working compiler
Given the compiler to use, `CMakeFindBinUtils.cmake` automatically
determines a number of tools including linker (CMAKE_LINKER) and archiver
(CMAKE_AR) and stores them in a generated file `CMakeCCompiler.cmake` as
non-CACHE entries. The compiler-specific ARMClang.cmake then tries to
override CMAKE_LINKER and CMAKE_AR as CACHE entries.

Following the introduction of CMP0126, which is set to NEW in the test
for a working compiler, setting a CACHE entry does not replace a normal
entry of the same name anymore, resulting in a failed test due to wrong
linker and archiver.

To fix this, set CMAKE_LINKER and CMAKE_AR for ARMClang directly in
`CMakeFindBinUtils.cmake` as is done for other compilers.  Check
for them in `ARMClang.cmake` to safeguard cases when a project explicitly
includes `ARMClang.cmake` prior to compiler determination (which some
projects do to work around other problems in older CMake versions).
2021-07-14 09:45:09 -04:00
Brad King 5e75fd6b94 Merge topic 'doc-cmake-build-signature' into release-3.21
161f1f42d6 Help: Clarify 'cmake --build' signature alternatives

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6343
2021-07-14 09:22:26 -04:00
Brad King 161f1f42d6 Help: Clarify 'cmake --build' signature alternatives
Documentation added by

* commit 4f4f2028b8 (Help: Add documentation for buildPresets and
                     testPresets, 2021-01-13, v3.20.0-rc1~51^2~7)
* commit 676ecf0d37 (cmake-presets: Add build and test presets,
                     2020-12-14, v3.20.0-rc1~51^2~6)

used square brackets in the `cmake --build` signature to indicate
non-optional alternatives, which is not a typical convention.
A common convention is to use parentheses instead, but in this
case it is probably clearer to list the two signatures separately.

Fixes: #22413
2021-07-13 09:41:26 -04:00
Brad King 00e8292434 Merge topic 'file-grd-arch' into release-3.21
b2c03347b0 file(GET_RUNTIME_DEPENDENCIES): Check architecture of dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6339
2021-07-13 08:18:32 -04:00
Brad King 49e1fdaf0e Merge topic 'doc-preset-example-v3' into release-3.21
2114d717a0 Help: Fix preset example cmakeMinimumRequired

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !6333
2021-07-13 08:17:30 -04:00
Brad King 27d248a784 Merge topic 'cpack-deb-post-ops' into release-3.21
805fa791d1 CPack/DEB: Avoid overriding user-provided `postinst` and `postrm`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6335
2021-07-13 08:16:26 -04:00
Brad King 0698c156ec Merge topic 'FindBLAS-LAPACK-All' into release-3.21
31ac4b9165 ci: Verify that Intel MKL is found when it is the only BLAS/LAPACK
57dcde19da Find{BLAS,LAPACK}: Avoid clobbering results when no vendor is requested

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6336
2021-07-13 08:15:06 -04:00
Alex Turbov 805fa791d1 CPack/DEB: Avoid overriding user-provided postinst and postrm
When a user provides `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA` or
`CPACK_DEBIAN_<comp>_PACKAGE_CONTROL_EXTRA` variables in
`CMakeLists.txt` and the package contains dynamic libraries, the
`CPackDeb.cmake` sets `CPACK_ADD_LDCONFIG_CALL` to `1`.  Later it
analyzes if defaulted `postinst`/`postrm` should be generated trying to
check if the user provides any in `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA`
variable. However, the `foreach` loop uses the invalid variable
`PACKAGE_CONTROL_EXTRA` instead, so these files gonna be overridden.
Fix the variable name.

Fixes: #22410
2021-07-12 17:04:29 -04:00
Kyle Edwards b2c03347b0 file(GET_RUNTIME_DEPENDENCIES): Check architecture of dependencies
Fixes: #22106
2021-07-12 16:11:38 -04:00
Brad King 31ac4b9165 ci: Verify that Intel MKL is found when it is the only BLAS/LAPACK
Issue: #22403
2021-07-12 11:11:37 -04:00
Brad King 57dcde19da Find{BLAS,LAPACK}: Avoid clobbering results when no vendor is requested
Logic added by commit 4c74c86f40 (FindBLAS/LAPACK: Add support for the
Fujitsu SSL2 library, 2021-01-27, v3.21.0-rc1~402^2~1) accidentally
expressed a boolean condition without proper grouping.  The pattern was
then copied by commit 2c9e623e31 (Find{BLAS,LAPACK}: Add support for the
NVHPC LAPACK library, 2021-05-05, v3.21.0-rc1~192^2).  The resulting
logic incorrectly tries Fujitsu and NVHPC vendors even after results are
found from another vendor, and then erases those.  Fix the grouping.

Fixes: #22403
2021-07-12 11:08:05 -04:00
Sérgio Martins 2114d717a0 Help: Fix preset example cmakeMinimumRequired
Since commit 8bc5c8961e (CMakePresets.json: Add the ability to
conditionally disable presets, 2021-03-10, v3.21.0-rc1~464^2)
the example requires presets version 3 support, which is not
available until CMake 3.21.  CMake 3.20.0 can't open v3 presets.
Make cmakeMinimumRequired compatible with the example's version.
2021-07-12 08:54:04 -04:00
Brad King ac984cb5f7 Merge branch 'release-3.20' into release-3.21 2021-07-12 08:35:15 -04:00
Brad King 5df2c45854 Merge topic 'intel-oneapi-std-windows' into release-3.21
a82af0e2ce Merge branch 'backport-3.20-intel-oneapi-std-windows'
1c227583a4 Tests: Fix RunCMake.try_compile C/CXX standards with IntelLLVM MSVC mode
1c14691a86 CMakeCCompilerId: Fix C standard detection in Clang and IntelLLVM MSVC mode
6eea123e3a Tests: Fix RunCMake.try_compile C/CXX standards with IntelLLVM MSVC mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6328
2021-07-12 08:33:31 -04:00
Brad King 79ca88ccd8 Merge topic 'FindJPEG-revert-turbo' into release-3.21
0de1f1503b FindJPEG: Revert "Search for 'turbojpeg' and 'turbojpeg-static' too"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6326
2021-07-12 08:32:18 -04:00
Brad King 9029335b52 Merge branch 'backport-3.20-intel-oneapi-std-windows' into release-3.20
Merge-request: !6328
2021-07-09 11:45:00 -04:00
Brad King a82af0e2ce Merge branch 'backport-3.20-intel-oneapi-std-windows' 2021-07-09 11:32:54 -04:00
Brad King 1c227583a4 Tests: Fix RunCMake.try_compile C/CXX standards with IntelLLVM MSVC mode
Since commit 5115dd1e2c (IntelLLVM: Fix C/C++ standard level flags on
Windows, 2021-07-07, v3.21.0-rc3~7^2^2) we activate C/C++ standard level
logic for IntelLLVM when targeting the MSVC ABI.  Update the
`RunCMake.try_compile` test to be aware of this even when CMake is
itself configured by an older CMake that does not know this.
2021-07-09 11:29:34 -04:00
Raul Tambre 1c14691a86 CMakeCCompilerId: Fix C standard detection in Clang and IntelLLVM MSVC mode
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.
2021-07-09 11:27:47 -04:00
Brad King 6eea123e3a Tests: Fix RunCMake.try_compile C/CXX standards with IntelLLVM MSVC mode
Since commit 84036d30d4 (IntelLLVM: Fix C/C++ standard level flags on
Windows, 2021-07-07, v3.21.0-rc3~8^2~1) we activate C/C++ standard level
logic for IntelLLVM when targeting the MSVC ABI.  Update the
`RunCMake.try_compile` test to be aware of this even when CMake is
itself configured by an older CMake that does not know this.
2021-07-09 11:04:52 -04:00
Brad King ad793ce825 Merge branch 'FindJPEG-revert-turbo' into release-3.20
Merge-request: !6326
2021-07-09 07:52:09 -04:00
Brad King 0de1f1503b FindJPEG: Revert "Search for 'turbojpeg' and 'turbojpeg-static' too"
Revert commit 74cc2e3326 (FindJPEG: Search for 'turbojpeg' and
'turbojpeg-static' too, 2021-01-09, v3.20.0-rc1~176^2) pending further
investigation.  The "turbo" variants are not drop-in replacements on all
platforms.

Fixes: #22333
2021-07-09 07:49:12 -04:00
Brad King 554ebf643d CMake 3.21.0-rc3 v3.21.0-rc3 2021-07-08 09:46:27 -04:00
Brad King 2402789aba Merge topic 'help_toplevel' into release-3.21
2df4badc5f Help: Note PROJECT_IS_TOP_LEVEL behavior w.r.t. ExternalProject

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6307
2021-07-08 09:44:08 -04:00
Michael Hirsch 2df4badc5f Help: Note PROJECT_IS_TOP_LEVEL behavior w.r.t. ExternalProject
Extend the documentation added by commit 96a7040107 (project: Define
variables indicating whether project is top level, 2021-03-24,
v3.21.0-rc1~443^2) to give some examples of how the variables are set in
each context.
2021-07-08 09:37:37 -04:00
Brad King a5ab4c741f Merge topic 'doc-lang-std' into release-3.21
d69b46bf01 Help: Document when CUDA_STANDARD values were added
bdb59839b9 Help: Document when OBJCXX_STANDARD values were added
627aca946b Help: Document when OBJC_STANDARD values as definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6321
2021-07-08 09:33:50 -04:00
Brad King 0d999978d2 Merge topic 'iar-linker-placeholder' into release-3.21
bf810c75ac IAR: Use placeholders in linker and archiver rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6322
2021-07-08 09:32:41 -04:00
Brad King d69b46bf01 Help: Document when CUDA_STANDARD values were added
Note that some CUDA C++ language standard levels were added before any
compilers actually supported them.  In such cases, the value of
`CUDA_STANDARD` gracefully degrades to the highest supported by the
compiler (unless `CUDA_STANDARD_REQUIRED` is enabled).  Therefore we can
document support for each value based on when CMake learned of it.
2021-07-08 08:35:15 -04:00
Brad King bdb59839b9 Help: Document when OBJCXX_STANDARD values were added 2021-07-08 08:35:15 -04:00
Brad King 627aca946b Help: Document when OBJC_STANDARD values as definition list 2021-07-08 08:35:14 -04:00
Jean-Marc Hengen bf810c75ac IAR: Use placeholders in linker and archiver rules
Update the IAR linker and archiver rules to use the `<CMAKE_LINKER>`
and `<CMAKE_AR>` placeholders instead of hard-coding the tool names.

Fixes: #22395
2021-07-08 08:08:52 -04:00
Brad King eb692af623 Merge topic 'FindCUDAToolkit-doc-version' into release-3.21
266fc8ada5 FindCUDAToolkit: Properly document the version support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6320
2021-07-08 07:53:52 -04:00
Brad King 71e2829c5f Merge branch 'release-3.20' into release-3.21 2021-07-08 07:50:28 -04:00
Brad King ecd557cbd7 Merge topic 'check_cxx_compiler_flag_no_normal_variable' into release-3.21
018d300ca0 Check*CompilerFlag: Do not set result as a normal variable too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6318
2021-07-08 07:49:30 -04:00
Brad King d2419c4132 Merge branch 'release-3.19' into release-3.20 2021-07-08 07:47:04 -04:00
Brad King 01b40cfd4b Merge branch 'check_cxx_compiler_flag_no_normal_variable' into release-3.20
Merge-request: !6318
2021-07-08 07:46:41 -04:00
Brad King 93b25f0bd5 Merge branch 'check_cxx_compiler_flag_no_normal_variable' into release-3.19
Merge-request: !6318
2021-07-08 07:46:16 -04:00
Robert Maynard 018d300ca0 Check*CompilerFlag: Do not set result as a normal variable too
This was previously fixed by commit d46590910c (Check*CompilerFlag: Do
not set result as a normal variable too, 2020-09-21, v3.18.3~1^2^2), but
was regressed by refactoring in commit 90dead024c (CheckCompilerFlag:
unified way to check compiler flags per language, 2020-09-25,
v3.19.0-rc1~88^2) due to the changes being developed concurrently.
Fix it again, and add a test case.

Fixes: #21207
2021-07-08 07:44:03 -04:00
Brad King 709d0369e8 Merge branch 'release-3.20' into release-3.21 2021-07-08 07:38:00 -04:00
Brad King cc654242c7 Merge topic 'intel-oneapi-std-windows' into release-3.21
13961f3b43 Merge branch 'backport-3.20-intel-oneapi-std-windows'
5115dd1e2c IntelLLVM: Fix C/C++ standard level flags on Windows
84036d30d4 IntelLLVM: Fix C/C++ standard level flags on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6319
2021-07-08 07:36:57 -04:00
Robert Maynard 266fc8ada5 FindCUDAToolkit: Properly document the version support 2021-07-07 13:42:08 -04:00
Brad King dc4b486933 Merge branch 'backport-3.20-intel-oneapi-std-windows' into release-3.20
Merge-request: !6319
2021-07-07 12:53:56 -04:00
Brad King 13961f3b43 Merge branch 'backport-3.20-intel-oneapi-std-windows' 2021-07-07 12:26:10 -04:00