Commit Graph

30361 Commits

Author SHA1 Message Date
Robert Maynard
5aa0dec6b0 cmake: --build and --install error out when encountering bad flags
Fixes #22186
2021-05-13 09:28:42 -04:00
Robert Maynard
928cdb17c5 cmCommandLineArgument: Correctly record parsing failures 2021-05-12 09:43:33 -04:00
Brad King
1ad4501ae9 CMake 3.20.2 2021-04-29 09:53:54 -04:00
Kyle Edwards
f8e2a74712 Ninja Multi-Config: Correctly generate POST_BUILD custom targets
Fixes: #22096
2021-04-22 15:51:53 -04:00
Brad King
b84f1e6159 Autogen: Restore mocs_compilation in OBJECT libraries
Since commit f65f20938c (Autogen: Avoid processing CSharp targets,
2020-11-12, v3.20.0-rc1~301^2) we collect all sources for a target
earlier than previously.  Clear the sources cache so that it will be
re-computed later after AUTOGEN processing.

Fixes: #22085
2021-04-20 16:04:08 -04:00
Brad King
a2372f64b4 Merge topic 'mrjoel/add-missing-not' into release-3.20
370bebd921 Add missing 'not' in error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6012
2021-04-19 09:44:02 -04:00
Joel Johnson
370bebd921 Add missing 'not' in error messages 2021-04-16 07:47:59 -06:00
Kyle Edwards
53d523f2e1 autogen: fix race in depfile parsing
cmReadGccDepfile() calls cmSystemTools::CollapseFullPath(), which
is not thread safe due to internal caching. Serialize calls to
cmReadGccDepfile() in autogen to avoid thread safety issues.

Fixes: #22014
2021-04-15 15:25:38 -04:00
Rafael Sadowski
317a477283 OpenBSD: Fix system feature definitions
Since commit f034b0f663 (CMake compilation: do not use compiler
extensions, 2020-03-14, v3.18.0-rc1~494^2), some sources explicitly
enable needed system APIs on some platforms using definitions like
`_POSIX_C_SOURCE` and `_XOPEN_SOURCE`.  Drop the definitions for
OpenBSD, which provides the POSIX APIs by default.
2021-04-14 11:02:29 -04:00
Brad King
9765ccfa71 CMake 3.20.1 2021-04-08 08:00:50 -04:00
Brad King
049757b8a8 Merge topic 'genex-HOST_LINK-in-try_compile' into release-3.20
6cf81efe7d Genex: $<HOST_LINK:> and $<DEVICE_LINK:> must be usable in try_compile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5964
2021-04-01 10:22:15 -04:00
Brad King
fca5aa8b33 Merge topic 'CUDA-device-link' into release-3.20
bb96984ec9 CUDA Device link: Ensure all link options are correctly formatted

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5962
2021-04-01 10:21:11 -04:00
Brad King
369d5c2bcf Merge topic 'make-fix-deps-paths' into release-3.20
1b346350af Makefiles dependencies: normalize windows paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5955
2021-04-01 10:19:58 -04:00
Marc Chevrier
6cf81efe7d Genex: $<HOST_LINK:> and $<DEVICE_LINK:> must be usable in try_compile
Fixes: #22007
2021-03-31 19:03:35 +02:00
Marc Chevrier
bb96984ec9 CUDA Device link: Ensure all link options are correctly formatted
Fixes: #21994
2021-03-31 12:05:23 +02:00
Brad King
c0092247fe Merge topic 'ninja-automoc-cycle' into release-3.20
ca7c76269b Tests: Add test for Ninja automoc dependency cyle
54ad3e4958 autogen: Don't include SKIP_AUTOMOC files in depfile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jörg Bornemann <joerg.bornemann@qt.io>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !5956
2021-03-30 09:54:09 -04:00
Brad King
1df75b171d Merge topic 'nmc-cc-no-output' into release-3.20
6dd89529e8 Ninja Multi-Config: Fix crash on custom command config with no output
e21a80e97d Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5950
2021-03-30 09:50:48 -04:00
Marc Chevrier
1b346350af Makefiles dependencies: normalize windows paths
Fixes: #21997
2021-03-30 15:04:03 +02:00
Kyle Edwards
54ad3e4958 autogen: Don't include SKIP_AUTOMOC files in depfile
SKIP_AUTOMOC files should not be included in moc processing, which
means they shouldn't be included in the depfile either. Remove them.

Fixes: #21977
2021-03-29 15:17:11 -04:00
Brad King
6dd89529e8 Ninja Multi-Config: Fix crash on custom command config with no output
With generator expressions in a custom command's `OUTPUT` and
`BYPRODUCTS`, it is possible to have no outputs at all for a particular
configuration.  Generate no rule in this case.

Fixes: #21989
2021-03-29 09:56:43 -04:00
Brad King
d212d91f14 Merge topic 'commands-file-permissions' into release-3.20
769ff05483 Help: Clarify permission-related command options
900184616a Cleanup: Fix misspelt name of local C++ variable
635431a0c9 Tests: Check host platform instead of target for running stat
4ceb0ca59e Tests: Remove redundant files for configure_file() tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5945
2021-03-29 09:32:09 -04:00
Brad King
0e37e0d215 Merge topic 'correct_arg_parsing' into release-3.20
79d7bcaf40 cmCommandLineArgument: correctly compute next parse index

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5936
2021-03-29 09:29:39 -04:00
Robert Maynard
79d7bcaf40 cmCommandLineArgument: correctly compute next parse index
Fixes #21966

Correctly compute the next parse index for `ZeroOrOne` when
it is zero, and for OneOrMore.
2021-03-26 09:34:46 -04:00
Craig Scott
900184616a Cleanup: Fix misspelt name of local C++ variable 2021-03-26 22:17:57 +11:00
Kyle Edwards
3b864b2583 Ninja Multi-Config: Include configs in long CC scripts
Fixes: #21973
2021-03-25 13:18:47 -04:00
Craig Scott
a6a5256395 CPack: Validate and document NSIS branding text trim positions 2021-03-24 16:35:29 +11:00
Brad King
b7b0fb4303 CMake 3.20.0 2021-03-23 11:43:17 -04:00
Brad King
06feb845aa CMP0118: Fix NEW behavior when looking up target sources
Under the CMP0118 NEW behavior, sources generated in one directory
should be visible when added to targets in other directories.  This was
accidentally left out of commit 6624b65b3f (GENERATED prop: Add
implementation for policy CMP0118 being set to NEW, 2020-11-09,
v3.20.0-rc1~393^2~1).

Fixes: #18399
2021-03-18 09:57:49 -04:00
Brad King
fab7fe7ef5 CMake 3.20.0-rc5 2021-03-17 10:16:33 -04:00
Brad King
74a65b0033 Merge topic 'ninja-regenerate-no-recompact' into release-3.20
6fd9c68ed0 Ninja: Do not recompact deps log in regeneration during a build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5916
2021-03-17 09:39:37 -04:00
Brad King
6fd9c68ed0 Ninja: Do not recompact deps log in regeneration during a build
Since commit fb18215904 (Ninja: clean ninja metadata once generated,
2019-05-13, v3.17.0-rc1~207^2) we recompact the ninja deps log during
regeneration.  That does not make sense during a build, so skip it if we
are regenerating during a build.

This problem went unnoticed previously because on non-Windows platforms
the deps log is just overwritten again by the outer build.  On Windows
platforms, recompaction during the build fails, but we did not actually
try to do that until commit 11f4259362 (Ninja: Clean metadata after
regen during build on Windows with 1.10.2+, 2020-11-30, v3.19.2~29^2~1).

Fixes: #21916
2021-03-16 09:37:35 -04:00
Sam Freed
83eeeff7dc Fail at read-time if configurePreset field invalid 2021-03-15 14:44:43 -07:00
Brad King
22612dd53a CMake 3.19.7 2021-03-15 09:39:14 -04:00
Brad King
1e2513b612 Merge topic 'vs-toolset-version' into release-3.20
30c835428f VS: Accept and translate '-T version=' values with three components
58a50a3a0a VS: Fix '-T version=14.28' under VS 16.9
09f59da7f0 cmGlobalVisualStudioVersionedGenerator: Clarify local variable name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5903
2021-03-15 08:50:13 -04:00
Brad King
30c835428f VS: Accept and translate '-T version=' values with three components
The VS 16.8 and VS 16.9 toolset versions differ only in their third
component.  The `vcvarsall` option `-vcvars_ver=` accepts a three
component version, so accept this format for VS toolset selection too.

Issue: #21922
2021-03-12 08:36:45 -05:00
Brad King
58a50a3a0a VS: Fix '-T version=14.28' under VS 16.9
CMake accepts the toolset version that is default in the current VS
version by matching the name later VS versions will use for the SxS
props files.  It predicts the future name based on the first two
components of the current VS version's default toolset.  However, this
heuristic breaks naming the VS 16.8 toolset version 14.28 under VS 16.9
because the latter's default toolset version is 14.28.29910, which did
not increment the second version component (unprecedented in VS).

Fix this by always using the requested version's SxS props file when it
exists, even if it matches the first two components of the current VS
version's default toolset.  Also add a special case for the name VS
16.10 will use for VS 16.9's default toolset, so that it can be used
with VS 16.9 too.

Fixes: #21922
2021-03-12 08:36:40 -05:00
Brad King
09f59da7f0 cmGlobalVisualStudioVersionedGenerator: Clarify local variable name 2021-03-12 06:33:51 -05:00
Brad King
c69d4b177f CMake 3.20.0-rc4 2021-03-11 09:23:18 -05:00
Brad King
4606082742 Merge topic 'xcode-framework-quoting' into release-3.20
4f9a71974e Xcode: Restore support for spaces in framework names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5899
2021-03-11 08:10:42 -05:00
Brad King
4f9a71974e Xcode: Restore support for spaces in framework names
In commit ce2dee9e5b (Xcode: Don't add framework as -framework argument
in linker info list, 2020-09-28, v3.19.0-rc1~47^2) we split up the path
to a framework into the directory and framework name parts, but only
retained the quoting on the directory part.  Restore quoting of the
framework name.

Fixes: #21910
2021-03-10 10:01:11 -05:00
Brad King
9ec50ff157 cmake-gui: Restore search bar case insensitivity
Since these changes:

* commit f1de6f6682 (cmake-gui: Support building against Qt6,
                     2020-12-17, v3.20.0-rc1~205^2~7)
* commit 134d69121e (cmake-gui: Restore search bar for cache view and
                     environment dialog, 2021-02-22, v3.20.0-rc2~12^2)

the search bar is no longer case insensitive when using Qt 5.12.[0-1],
and possibly some later versions.  It works as of Qt 5.15 though, so
update our version check accordingly.

Fixes: #21884
2021-03-04 11:25:54 -05:00
Brad King
12a139f2b6 CMake 3.20.0-rc3 2021-03-03 11:43:22 -05:00
Brad King
498b7da2e4 CMake 3.20.0-rc2 2021-02-24 11:21:15 -05:00
Brad King
0ecd9de6dd CMake 3.19.6 2021-02-24 10:08:43 -05:00
Brad King
e95f7aa0ed Merge topic 'preset-flag-consistency' into release-3.20
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument
3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument
2f13fdef0a cmake: Document '--preset <preset>' form of the argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5849
2021-02-24 09:46:52 -05:00
Brad King
14c6a88db6 Merge topic 'LINK_LANGUAGE-genex-respects-LINKER_LANGUAGE-property' into release-3.20
b722eea925 Genex: LINK_LANGUAGE respects LINKER_LANGUAGE property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5841
2021-02-24 09:45:50 -05:00
Brad King
261ba00668 Merge topic 'autogen-cmp0116-fix' into release-3.20
339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation
e3740e020e Tests: Test Qt autogen target with CMP0116 set to WARN
cf34011ce7 Tests: Test per-CC behavior of CMP0116
3a95503512 Ninja: Use CMP0116 status recorded at time of custom command's creation
f01f10e8fb cmCustomCommand: Record value of CMP0116 at time of creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5848
2021-02-24 09:44:59 -05:00
Brad King
06e16ea008 Merge branch 'backport-3.19-preset-no-comments' into preset-no-comments 2021-02-24 09:33:59 -05:00
Kyle Edwards
431dd59b5e CMakePresets.json: Remove undocumented support for comments
Fixes: #21858
2021-02-24 09:28:36 -05:00
Brad King
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument
The main `cmake --preset` argument for configure presets supports both
forms, so support it for `ctest --preset` too.

Fixes: #21855
2021-02-23 09:22:00 -05:00