Commit Graph

48896 Commits

Author SHA1 Message Date
Cristian Adam 8a2977ba55 OBJCXX: Fix regression for compiling cpp files as objcxx
In commit 8d61294c3e (PCH: Mark CMake PCH source files as -x
<lang>-header, 2020-09-04, v3.18.3~14^2) we removed the explicit `-x
objective-c++` flag.  This broke cases with custom source extensions.

Restore the explicit `-x objective-c[++]` flag and put it before the
`<FLAGS>` placeholder.  The latter will contain the proper `-x
objective-c[++]-header` value and will override the `-x objective-c[++]`
value set before.

Fixes: #21234
2020-09-29 12:35:49 -04:00
Brad King 7d4e9a3a3a Merge topic 'vs-c11' into release-3.18
b11c723678 VS: Populate `std:c{11,17}` flag table entries for v142

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5290
2020-09-29 05:39:59 -04:00
Brad King b11c723678 VS: Populate std:c{11,17} flag table entries for v142
The `-std:c11` option added by commit f7347f28c7 (MSVC: Record support
for C11 and c_restrict, 2020-08-09, v3.18.2~9^2) needs this flag table
entry to map in the VS IDE properly.

Issue: #21069
2020-09-28 15:51:01 -04:00
Brad King 99f92d55d6 Merge topic 'FindJNI-aarch64' into release-3.18
696d16ae6c FindJNI: Add aarch64 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vitaly Lipatov <lav@etersoft.ru>
Merge-request: !5275
2020-09-28 08:38:54 -04:00
Brad King c6c90b4207 Merge topic 'clang-llvm-lib' into release-3.18
f5d3da091b Clang: Look for llvm-lib when using MSVC-like front-end

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !5264
2020-09-25 12:23:02 -04:00
Brad King 696d16ae6c FindJNI: Add aarch64 support
Extend the fix from commit 44dffbcc94 (FindJNI: Add arm64 support,
2020-08-25, v3.18.3~21^2) to cover the `aarch64` name too.

Fixes: #21237
2020-09-25 12:04:34 -04:00
Shoaib Meenai f5d3da091b Clang: Look for llvm-lib when using MSVC-like front-end
In commit 55196a1440 (MSVC: Use 'lib' instead of 'link /lib' to create
static libraries, 2020-01-10, v3.18.0-rc1~625^2) we changed CMake to use
lib instead of `link /lib` to create static libraries, but it didn't
search for `llvm-lib`. If you have `llvm-lib` but not `lib` (e.g. when
cross-compiling), when `CMakeFindBinutils` is invoked for the `C` and
`CXX` languages, `CMAKE_AR` is not found. When it's subsequently invoked
for the ASM language, `CMAKE_ASM_SIMULATE_ID` and
`CMAKE_ASM_COMPILER_FRONTEND_VARIANT` are not set (because
`CMakeDetermineASMCompiler` doesn't call `CMAKE_DETERMINE_COMPILER_ID`,
which sets those variables), so we go down the non-MSVC conditional and
set `CMAKE_AR` to a GNU-style `ar`, which of course does not understand
lib flags. Explicitly search for `llvm-lib` to avoid this situation.
2020-09-24 15:37:24 -04:00
Brad King d031b7b044 Merge topic 'FindPython-fix-regex' into release-3.18
6c094c1c1e FindPython: Fix erroneous regex in ABI check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5257
2020-09-24 15:08:52 -04:00
Marc Chevrier 6c094c1c1e FindPython: Fix erroneous regex in ABI check
A regex added by commit 6fdfe2428d (FindPython: enhance ABI checks
against include directory, 2020-09-02, v3.18.3~17^2) was missing a
backslash.

Fixes: #21223
2020-09-23 11:37:20 -04:00
Brad King 177fc02073 CMake 3.18.3 v3.18.3 2020-09-22 08:53:09 -04:00
Brad King 0b95e6164e Merge topic 'check-compiler-flag-result' into release-3.18
d4390c13e9 Merge branch 'backport-3.17-check-compiler-flag-result'
d46590910c Check*CompilerFlag: Do not set result as a normal variable too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alexander Grund <github@grundis.de>
Merge-request: !5250
2020-09-22 07:38:17 -04:00
Brad King d4390c13e9 Merge branch 'backport-3.17-check-compiler-flag-result' 2020-09-21 10:37:56 -04:00
Brad King d46590910c Check*CompilerFlag: Do not set result as a normal variable too
Refactoring in commit cb984c6627 (Check*CompilerFlag: Modernize modules,
2019-12-09, v3.17.0-rc1~320^2) accidentally left the result set as a
normal variable in addition to as a cache entry.  This is not specified
by the documentation, and is not the behavior in CMake 3.16 and below.

Fixes: #21207
2020-09-21 10:33:19 -04:00
Brad King c9bc062632 Merge topic 'foreach-int-parse-range-check' into release-3.18
0412b55b83 foreach: Fix crash parsing integer out of range

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5239
2020-09-21 08:55:29 -04:00
Ben McMorran 0412b55b83 foreach: Fix crash parsing integer out of range 2020-09-18 09:54:58 -04:00
Brad King f332b05666 Merge topic 'ninja-multi-automoc-regression' into release-3.18
23fe4b861f Ninja Multi-Config: Fix dependencies of custom commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5238
2020-09-18 08:42:28 -04:00
Brad King ded92f69fe Merge topic 'FindMatlab-r2020b' into release-3.18
4d292aecb6 FindMatlab: add R2020b => 9.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5233
2020-09-18 08:41:08 -04:00
Kyle Edwards 23fe4b861f Ninja Multi-Config: Fix dependencies of custom commands
a9fd3a10 addressed the scenario where the depending target is a
utility target, but not the scenario where the dependent target is
a utility target. Account for this scenario.

Also add a Qt-specific test case.

Fixes: #21118
2020-09-17 15:46:57 -04:00
Brad King ac487f870b Merge topic 'ci-xcode-11.7' into release-3.18
53709c764e gitlab-ci: update macOS jobs to use Xcode 11.7

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5236
2020-09-17 13:00:37 -04:00
Brad King 53709c764e gitlab-ci: update macOS jobs to use Xcode 11.7 2020-09-17 11:26:22 -04:00
Michael Hirsch 4d292aecb6 FindMatlab: add R2020b => 9.9 2020-09-17 08:58:21 -04:00
Brad King 314039ba45 Help: Update 3.18.2 release notes to mention 3.16.9 and 3.17.5
A change made in 3.18.2 was backported to the 3.16 and 3.17 branches.
Update the 3.18 release note to mention them.
2020-09-15 09:27:56 -04:00
Brad King 42edc1a0b4 Merge branch 'release-3.17' into release-3.18 2020-09-15 09:27:00 -04:00
Brad King 58b37ae201 Merge branch 'release-3.16' into release-3.18 2020-09-15 09:26:48 -04:00
Brad King 566e96d42d CMake 3.17.5 v3.17.5 2020-09-15 08:34:16 -04:00
Brad King 2058c7a4f7 Merge branch 'backport-3.17-automoc-path-prefix-off' into release-3.17 2020-09-15 08:32:26 -04:00
Brad King 3ef992eb06 Merge branch 'release-3.16' into release-3.17 2020-09-15 08:32:11 -04:00
Joerg Bornemann 205d5431d7 Help: Add 3.17.5 release note about AUTOMOC_PATH_PREFIX default change 2020-09-15 08:31:35 -04:00
Brad King b9bcec40c1 Merge branch 'backport-3.16-automoc-path-prefix-off' 2020-09-15 08:29:12 -04:00
Brad King 43ddc64032 CMake 3.16.9 v3.16.9 2020-09-15 08:11:59 -04:00
Brad King 37b669a4ff Merge branch 'backport-3.16-automoc-path-prefix-off' into release-3.16 2020-09-15 08:11:45 -04:00
Joerg Bornemann 52217c3440 Help: Add 3.16.9 release note about AUTOMOC_PATH_PREFIX default change 2020-09-15 08:10:31 -04:00
Brad King 5b5d2dc766 Merge topic 'armclang-fixes' into release-3.18
3d1ed986e2 ARMClang: Fix link line generation after addition of armlink support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Osama Moharam <osama.moharam.uw@renesas.com>
Merge-request: !5211
2020-09-11 08:30:33 -04:00
Brad King 1db8c1dce2 Merge topic 'file-GENERATE-earlier' into release-3.18
aee2c51224 file(GENERATE): Create output file structures for all directories first

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5209
2020-09-11 08:27:12 -04:00
Marc Chevrier 3d1ed986e2 ARMClang: Fix link line generation after addition of armlink support
Revise logic added by commit 73fb6ac82b (ARMClang: Add support for
armlink, 2020-06-02, v3.18.0-rc1~27^2).

Fixes: #21154
2020-09-10 16:33:14 -04:00
Josef Angstenberger aee2c51224 file(GENERATE): Create output file structures for all directories first
Since commit 36ded610af (PCH: Generate sources during Compute step,
2019-10-05, v3.16.0-rc1~2^2) the source file lookup is done earlier than
before.  Its parent commit f1fb63b306 (file(GENERATE): Create output
file structures even earlier, 2019-10-07, v3.16.0-rc1~2^2~1) prepared
for that.  However, that commit did not account for generating and
using files in separate subdirectories.

Fix this by evaluating all generated files before adding automatic
files.

Fixes: #21144
2020-09-10 16:13:01 -04:00
Brad King 06cb6a1628 Merge topic 'gitlab-ci-prefer-mr' into release-3.18
f6a80ffd54 gitlab-ci: Prefer MR rules for any pipeline associated with a MR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5214
2020-09-10 16:02:56 -04:00
Brad King f6a80ffd54 gitlab-ci: Prefer MR rules for any pipeline associated with a MR
GitLab 13.3 started creating MR pipelines in the parent project of a MR
from a fork, at least when the MR submitter is a developer in the parent
project.  If the pipeline is associated with a MR, we should use the
corresponding rules regardless of which project hosts the pipeline.
2020-09-10 15:48:13 -04:00
Brad King 9b5f167348 Merge topic 'automoc-rerun-missing-dependency' into release-3.18
9ac3503d30 AutoMoc: Re-run moc if a dependency is missing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5180
2020-09-10 09:45:52 -04:00
Brad King 8de27c599f Merge topic 'pch-tv90' into release-3.18
ce7c100545 PCH: Fix 30s wait for VS2008 when used via -Tv90

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5199
2020-09-09 11:24:34 -04:00
Brad King 802584f0c2 Merge topic 'ios-pch-x-lang-header' into release-3.18
8d61294c3e PCH: Mark CMake PCH source files as -x <lang>-header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5188
2020-09-09 11:23:34 -04:00
Joerg Bornemann 9ac3503d30 AutoMoc: Re-run moc if a dependency is missing
AutoMoc uses the moc-emitted dependency file of Qt 5.15 to track
dependencies. Such a dependency may well live outside the project and
can vanish, for example when installing a new compiler version.

This situation was detected before, but merely a warning was issued.
Now, we're considering a generated file as out of date if a dependency
is missing and re-generate it.

We also have to remove the missing dependency from the ParseCache.
Otherwise the AUTOMOC target for all generators other than Ninja will
always be out of date.

The ParseCacheChanged flag had to be made atomic, because we're
potentially accessing it from multiple threads. The dependencies vector
itself is not vulnerable in this regard, because there's one vector per
file, and we're accessing exactly one ParseCacheT::FileHandleT per thread.

Fixes: #21136
2020-09-09 12:51:28 +02:00
Brad King 0834b8b8cb Merge topic 'FindPython-set-CMP0012-NEW' into release-3.18
0670797d71 FindPython: CMP0012 must be set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5198
2020-09-08 11:13:48 -04:00
Cristian Adam ce7c100545 PCH: Fix 30s wait for VS2008 when used via -Tv90
Fixes: #21142
Backport: release
2020-09-07 19:49:15 +02:00
Marc Chevrier 0670797d71 FindPython: CMP0012 must be set to NEW
Fixes: #21168
2020-09-07 18:19:30 +02:00
Cristian Adam 8d61294c3e PCH: Mark CMake PCH source files as -x <lang>-header
Fixes: #21163
2020-09-04 19:23:17 +02:00
Brad King fff360c60c Merge topic 'ninja-multi-automoc-regression' into release-3.18
a9fd3a107d Ninja Multi-Config: Fix dependencies of utility targets
f1199bdc96 Ninja Multi-Config: Fix cleaning of utility targets with commands
657047cd24 Ninja Multi-Config: Fix clean:all target
c35d1927a5 Tests: Pass additional Qt information to Ninja and NMC tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5177
2020-09-03 08:47:33 -04:00
Brad King be66f2e24f Merge topic 'FindPython-include-dir-ABI-checks' into release-3.18
6fdfe2428d FindPython: enhance ABI checks against include directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5181
2020-09-03 08:46:36 -04:00
Kyle Edwards a9fd3a107d Ninja Multi-Config: Fix dependencies of utility targets
Fixes: #21118
2020-09-02 12:59:59 -04:00
Kyle Edwards f1199bdc96 Ninja Multi-Config: Fix cleaning of utility targets with commands 2020-09-02 12:59:59 -04:00