Commit Graph

55196 Commits

Author SHA1 Message Date
Brad King dfdcb4fc3d Merge branch 'backport-3.22-ci-msvc-19.31' into release-3.22
Merge-request: !7059
2022-03-09 12:59:55 -05:00
Brad King 90a9bff01e Merge branch 'irsl-oneapi-linux' into release-3.22
Merge-request: !7057
2022-03-09 12:58:09 -05:00
Attila Krasznahorkay 3e84a06b3a IRSL: Add paths for Intel oneAPI compilers on Linux
They are stored in a slightly different place with oneAPI than they
used to be in PSXE.

A similar change was made for Windows by commit 956160bb9a (IRSL: Fix
search for Windows redist files with Intel Classic compiler, 2021-09-23,
v3.22.0-rc1~88^2), which left a comment about the locations relative to
the Classic and oneAPI compilers.

Fixes: #23310
2022-03-09 12:53:37 -05:00
Brad King e66de43180 gitlab-ci: Update Windows builds to MSVC 19.31 toolset 2022-03-09 10:02:01 -05:00
Brad King 71268ca934 Merge branch 'release-3.21' into release-3.22 2022-03-08 11:55:31 -05:00
Brad King 3f737ba2ec Merge branch 'binutils-llvm-mt' into release-3.22
Merge-request: !7054
2022-03-08 11:55:16 -05:00
Brad King 33ed5b97fe Merge branch 'binutils-llvm-mt' into release-3.21
Merge-request: !7054
2022-03-08 11:54:58 -05:00
Brad King 73d0d4e4b5 BinUtils: Avoid llvm-mt because it is missing 'mt' features we use
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the
more-specific name `llvm-mt` over `mt` when using Clang.  However, the
`llvm-mt` tool does not yet support all the flags we need in the
implementation of `vs_link_{exe,dll}`.  Prefer plain `mt` for now.

Fixes: #23305
2022-03-08 11:48:30 -05:00
Brad King 5424bf5c8a Merge branch 'FindMatlab-minver' into release-3.22
Merge-request: !7047
2022-03-07 10:13:25 -05:00
Michael Hirsch bb2c7b7dc0 FindMatlab: Fix logic error when minimum version is not found
Fix logic added by commit 7fdd5128b1 (FindMatlab: Fix version selection
if a version is given, 2021-07-02, v3.22.0-rc1~66^2).  Ensure that
`_list_index` is always initialized to -1, akin to `list(FIND)` not
finding a match.

Issue: #22377
2022-03-07 10:12:43 -05:00
Brad King 6e9eaf209d CMake 3.22.3 v3.22.3 2022-03-04 12:06:35 -05:00
Brad King e7c9304504 Merge branch 'release-3.21' into release-3.22 2022-03-04 11:54:30 -05:00
Brad King 78ae759e01 CMake 3.21.6 v3.21.6 2022-03-04 10:52:43 -05:00
Brad King 5419cc3b8b Merge branch 'while-bug-compatibility' into release-3.22
Merge-request: !7041
2022-03-03 16:54:35 -05:00
Alex Turbov da2361ffb3 while: Restore tolerance of condition error
Since commit 880ca66b51 (Fix: `while()` can silently ignore incorrect
condition, 2021-08-09, v3.22.0-rc1~238^2~4) we correctly reject the
code

    set(paren "(")
    while(${paren})
    endwhile()

However, rejecting it breaks compatibility with projects that used such
code accidentally.  In CMake 3.21 and below, any error in the condition
was ignored because the `false` result exited the loop first.  Restore
tolerance of the error for now.  A policy will be needed to make it an
error later.

Note that the same condition with `if` was always correctly rejected.

Fixes: #22524
Issue: #23296
Co-authored-by: Brad King <brad.king@kitware.com>
2022-03-03 16:51:34 -05:00
Brad King 47d197745a Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases 2022-03-03 16:51:34 -05:00
Brad King 4331f97118 Merge branch 'release-3.21' into release-3.22 2022-03-03 12:58:14 -05:00
Brad King 7edc09b4f6 Merge branch 'binutils-llvm-ar-clang-macos' into release-3.22
Merge-request: !7039
2022-03-03 12:58:00 -05:00
Brad King e47e5c7959 Merge branch 'binutils-llvm-ar-clang-macos' into release-3.21
Merge-request: !7039
2022-03-03 12:55:33 -05:00
Brad King 29ea94e17c BinUtils: Avoid llvm-ar on Apple platforms
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the
more-specific name `llvm-ar` over `ar` when using Clang.  However, on
Apple platforms, `llvm-ar` does not generate a symbol table that the
Apple linker accepts.  Fall back to `ar` on Apple platforms.

Fixes: #23269
2022-03-03 12:54:10 -05:00
Brad King 371235e0d7 Merge branch 'release-3.21' into release-3.22 2022-02-28 13:09:25 -05:00
Brad King 7a16688f02 Merge branch 'FindThreads-revert-libc-pthread-flag' into release-3.22
Merge-request: !7025
2022-02-28 13:09:19 -05:00
Brad King 02b04f1ca8 Merge branch 'FindThreads-revert-libc-pthread-flag' into release-3.21
Merge-request: !7025
2022-02-28 13:09:00 -05:00
Brad King c6da90bd39 FindThreads: Revert "Honor THREADS_PREFER_PTHREAD_FLAG when ... in libc"
Revert commit 5efb6fb516 (FindThreads: Honor THREADS_PREFER_PTHREAD_FLAG
when pthread is found in libc, 2021-11-03, v3.21.5~4^2).  The check for
the `-pthread` flag can pass on compilers like XL, that interprets it as
`-p -t hread` and returns zero.  Prior to that commit, we did not use
the check in the `CMAKE_HAVE_LIBC_PTHREAD` code path.  Now we do, it
succeeds, and we incorrectly add the `-pthread` flag for XL.

This change was backported to the 3.21 and 3.22 release series long
after they initially came out.  Since there may be more cases where we
now add `-pthread` incorrectly, it is simplest to revert the change in
all release series pending further investigation.

Fixes: #23270
2022-02-28 12:53:15 -05:00
Brad King fa9bba4905 Merge branch 'test-qt-disable' into release-3.22
Merge-request: !6998
2022-02-17 11:11:20 -05:00
Brad King 5bfff3c750 Tests: Add missing guards on Qt4 and Qt5 tests
Add missing `CMake_TEST_Qt{4,5}` conditions on Qt4 an Qt5 tests.
Configuring CMake with `-DCMake_TEST_Qt5=OFF` should prevent any
attempt to search for Qt5.

Fixes: #23239
2022-02-17 11:00:25 -05:00
Brad King 3596758811 Merge branch 'FindGLUT-link-dirs' into release-3.22
Merge-request: !6985
2022-02-15 10:37:11 -05:00
Silvio Traversaro 44f7238d5d FindGLUT: Use link directories for libs from pkg-config
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2), the `GLUT_LIBRARIES` may come
from `pkg-config`, in which case they may be `-l` flags instead of
absolute paths.  Propagate `GLUT_LIBRARY_DIRS` to GLUT::GLUT too.

Fixes: #23229
2022-02-15 10:35:11 -05:00
Brad King a16cefeafe Merge branch 'FindMatlab-mcr911' into release-3.22
Merge-request: !6976
2022-02-14 10:24:51 -05:00
Tom M b8d885ed0d FindMatlab: Fix version detection for MCR >= 9.10
Recent MCR versions have the following `VersionInfo.xml`:

    <version>9.11.0.1837725</version>

Fix parsing of multiple digits in the version components
so that we do not mistake this for version `9.1`.
2022-02-14 10:23:33 -05:00
Brad King e6e9c8e484 Merge branch 'restore-target-export-includes' into release-3.22
Merge-request: !6969
2022-02-14 09:48:10 -05:00
Eugene Shalygin 83d79636bf install(TARGETS): Restore per-export INCLUDES DESTINATION
In commit 55e4753bbb (Refactor cmTargetExport removing
InterfaceIncludeDirecories, 2021-07-20, v3.22.0-rc1~337^2~1) the storage
of `INCLUDES DESTINATION` was moved into each target.  However, a target
may be installed in multiple exports, and their `INCLUDES DESTINATION`
should not be mixed.

Convert the IncludeDirectoriesEntries vector to a map and modify access
function to store the directories lists with respect to cmExportTarget
object. This fixes error when the same target is exported more than once
via different exports and each for consequent export its include
directories list grows. Add a test for this case.

Fixes: #23183
2022-02-09 13:31:26 -05:00
Brad King 21d8a86804 Merge branch 'release-3.21' into release-3.22 2022-02-09 10:09:55 -05:00
Brad King 1a30d3ade5 Merge branch 'backport-IntelLLVM-depfile-flags' into release-3.22
Merge-request: !6964
2022-02-09 10:09:51 -05:00
Brad King be20a94fac Merge branch 'backport-IntelLLVM-depfile-flags' into release-3.21
Merge-request: !6964
2022-02-09 10:09:28 -05:00
William R. Dieter a8b6bf9a38 IntelLLVM: Add dependencies on system header files on Windows
In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based
compilers, 2020-11-02, v3.20.0-rc1~89^2~20) the IntelLLVM depfile
generation flags were taken from `Platform/Windows-Intel-C`.  Those
flags were added by commit a624a3e1b3 (Ninja: Use deps=gcc for Intel
Compiler on Windows, 2019-01-30, v3.14.0-rc1~30^2), which forgot to
account for commit 6d74e7870b (Ninja: Add dependencies on
system-provided header files, 2016-03-15, v3.6.0-rc1~265^2).

The `-QMD` option generates Makefile dependencies.  The `-QMMD` option
generates Makefile dependencies, but excludes system header files.
Part of the BuildDepends test includes a header, cmake_pch.hxx, that
includes a second header, zot_pch.hxx.  The test builds a pch file for
cmake_pch.hxx, touches zot_pch.hxx, then verifes that cmake_pch.hxx.pch
is regenerated based on the dependencies.

The cmake_pch.hxx contains `#pragma system_header` before it includes
zot_pch.hxx.  `#pragma system_header` indicates that the portion of the
file following the pragma is to be treated as a system header.

When `-QMMD` is used to generate dependencies, the `#include` of
zot_pch.hxx is ignored because it `-QMMD` says to ignore system headers.

Using `-QMD` instead uses all headers when generating dependencies
and causes this test to pass.  The Clang configuration in
Platform/Windows-Clang.cmake also uses the `-MD` option for generating
pre-compiled headers, instead of `-MMD`.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2022-02-09 10:07:51 -05:00
Brad King 94f1bbdd54 Intel: Add dependencies on system header files on Windows
In commit a624a3e1b3 (Ninja: Use deps=gcc for Intel Compiler on Windows,
2019-01-30, v3.14.0-rc1~30^2) we forgot to account for commit 6d74e7870b
(Ninja: Add dependencies on system-provided header files, 2016-03-15,
v3.6.0-rc1~265^2).
2022-02-09 10:07:51 -05:00
Brad King 298bf1ed9d Merge branch 'doc-MSVC_TOOLSET_VERSION-v143' into release-3.22
Merge-request: !6966
2022-02-09 09:54:44 -05:00
Brad King 4423fa2b38 Merge branch 'doc-MSVC_TOOLSET_VERSION-v143' into release-3.21
Merge-request: !6966
2022-02-09 09:54:18 -05:00
Heiko Thiel dca3a032d1 Help: Add MSVC_TOOLSET_VERSION value for v143 toolset
This was accidentally left out of commit f01ea7e391 (MSVC: Fix
MSVC_TOOLSET_VERSION for VS 2022 v143 toolset, 2019-04-03,
v3.21.3~10^2~1).
2022-02-09 09:53:11 -05:00
Brad King b91c4dfb75 Merge branch 'FindGSL-version-regex' into release-3.22
Merge-request: !6960
2022-02-08 10:31:16 -05:00
مهدي شينون (Mehdi Chinoune) b67ff61c3a FindGSL: Improve version extraction regex
Backport commit 58f2708b90 (FindGSL: Improve version extraction regex,
2021-12-17) to the CMake 3.22 branch.

Fixes: #23017
2022-02-08 10:21:15 -05:00
Brad King d60647a52b Merge branch 'default-extensions' into release-3.22
Merge-request: !6949
2022-02-03 12:52:45 -05:00
Brad King 4ef6e27cb9 CompilerId: Fix default extensions check for Clang targeting MSVC ABI
In commit fc3a1cbdd8 (CompilerID: Compiler extensions default detection,
2021-05-29, v3.22.0-rc1~52^2~2), extensions were assumed to be `OFF`
for Clang targeting the MSVC ABI.  However, the `clang` and `clang++`
tools both seem to have extensions enabled by default even when
targeting the MSVC ABI.

This can be observed with the `RunCMake.CompileFeatures` test.
It fails with the GNU-like `clang/clang++` front-end, but removing
the above special case makes it pass.  The test passes either way
with the MSVC-like `clang-cl` front-end.
2022-02-03 12:06:00 -05:00
Brad King 17f97143cb Merge branch 'release-3.21' into release-3.22 2022-02-01 12:08:05 -05:00
Brad King 6fe5df13c2 CMake 3.21.5 v3.21.5 2022-02-01 10:54:10 -05:00
Brad King 68ab7b187c Merge branch 'ci-assertions' into release-3.22
Merge-request: !6927
2022-02-01 10:27:24 -05:00
Brad King 79aa2c530a Merge branch 'release-3.21' into release-3.22 2022-02-01 09:51:43 -05:00
Brad King cb66d25747 Merge topic 'help-try-compile-result-var' into release-3.22
34d263270e Help: Drop incorrect versionadded for try_compile result variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6923
2022-02-01 09:50:40 -05:00
Brad King fc2735426d Merge branch 'release-3.20' into release-3.21 2022-01-31 11:36:57 -05:00