Commit Graph

8388 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
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
Joel Johnson
370bebd921 Add missing 'not' in error messages 2021-04-16 07:47:59 -06:00
Brad King
3953dfcb31 Restore support for backslashes in initial language-wide flags
Refactoring in commit bdc40742bd (CMakeDetermineCompilerId: Test without
COMPILER_ID_FLAGS if REQUIRE_SUCCESS, 2021-02-27, v3.20.0-rc3~6^2) added
an extra macro layer through which flag strings are passed.  That caused
an extra level of argument re-parsing, and broke flags with backslashes.
Pass flags to the helper macro through variable names instead.

Fixes: #22041
2021-04-07 13:53:22 -04:00
Brad King
2e029ec598 Merge topic 'rel-file-table' into release-3.20
e17006c497 Utilities/Release: Add deprecation fields to File Table v1
89ab613248 Utilities/Release: Update file table for 3.20.0
c5777e5421 Merge branch 'backport-3.19-rel-file-table' into rel-file-table
f9f59fb0b2 Merge branch 'release-3.19' into backport-3.19-rel-file-table
30959aec8f Utilities/Release: Update file table for 3.19.3
d206c8f1ec Merge tag 'v3.19.3' into backport-3.19-rel-file-table
004dbbaddd Utilities/Release: Update file table for 3.19.2
1e3301a28c Merge tag 'v3.19.2' into backport-3.19-rel-file-table
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !5961
2021-04-06 08:44:53 -04:00
Brad King
e061a201b6 Merge topic 'nvhpc-lib-arch' into release-3.20
764606e256 CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths
5d44d73bbe CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5984
2021-04-06 08:32:34 -04:00
Robert Maynard
764606e256 CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths
The NVHPC compiler does not have any implicit link directories that can
be used to detect `CMAKE_LIBRARY_ARCHITECTURE`, but it does have
implicit object files.  Extract implicit object file paths from link
lines and check them for the `CMAKE_LIBRARY_ARCHITECTURE` pattern.

Issue: #22024
2021-04-05 17:41:10 -04:00
Robert Maynard
5d44d73bbe CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths"
The change in commit 657fc3a9a7 (CMakeDetermineCompilerABI: Parse
library arch from versioned paths, 2021-02-03, v3.20.0-rc1~40^2) caused
`CMAKE_LIBRARY_ARCHITECTURE` to be populated on non-multiarch platforms
if their compilers happen to use `$arch/$version` library directories.
Revert the use of versioned library paths.

Fixes: #22024
2021-04-05 16:40:43 -04:00
Brad King
89ab613248 Utilities/Release: Update file table for 3.20.0 2021-04-05 13:47:02 -04:00
Brad King
c5777e5421 Merge branch 'backport-3.19-rel-file-table' into rel-file-table 2021-04-05 13:46:35 -04:00
Brad King
f9f59fb0b2 Merge branch 'release-3.19' into backport-3.19-rel-file-table 2021-04-05 13:45:08 -04:00
Brad King
30959aec8f Utilities/Release: Update file table for 3.19.3 2021-04-05 13:45:00 -04:00
Brad King
d206c8f1ec Merge tag 'v3.19.3' into backport-3.19-rel-file-table 2021-04-05 13:44:49 -04:00
Brad King
004dbbaddd Utilities/Release: Update file table for 3.19.2 2021-04-05 13:44:42 -04:00
Brad King
1e3301a28c Merge tag 'v3.19.2' into backport-3.19-rel-file-table 2021-04-05 13:44:36 -04:00
Brad King
383bfbe76f Merge branch 'backport-3.18-rel-file-table' into backport-3.19-rel-file-table 2021-04-05 13:44:27 -04:00
Brad King
0237eba318 Utilities/Release: Add script to generate a table of files
Fixes: #22002
2021-04-05 13:43:51 -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
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
Brad King
fc9c1d83bf Tests: Add RunCMake helper to run a plain script
Many tests covering CMake scripting commands can work without
initializing a full generator.
2021-03-31 12:00:09 -04: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
Kyle Edwards
ca7c76269b Tests: Add test for Ninja automoc dependency cyle 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
e21a80e97d Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output
Ninja versions prior to 1.6.0 occasionally print this message.
2021-03-29 09:55:57 -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
635431a0c9 Tests: Check host platform instead of target for running stat 2021-03-26 22:17:57 +11:00
Craig Scott
4ceb0ca59e Tests: Remove redundant files for configure_file() tests 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
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
Sam Freed
b9eb3541cf Tests: update tests to catch invalid configurePreset at read-time 2021-03-15 14:53:00 -07: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
Craig Scott
57d442e182 Revert ExternalProject and FetchContent refactoring
Refactoring of the ExternalProject and FetchContent modules moved
the commands into CMake scripts. This broke custom commands that
used shell redirection or special build tool variables of the form
$(MakeVar). Undo the sequence of commits that performed this
refactoring and follow-up fixes associated with it.

The following commits are reverted by this change:

4f3d1abbb4 (ExternalProject: Refactor pre-configure steps to support
no-target uses, 2021-02-05)

17e5516e60 (FetchContent: Invoke steps directly and avoid a separate
sub-build, 2021-01-29)

bd876f3849 (FetchContent: Restore patch command support,
2021-02-18)

404cddb7bb (ExternalProject: Fix misuse of IS_NEWER_THAN in
timestamp checks, 2021-02-21)

b0da671243 (FetchContent: Don't update timestamps if files don't
change, 2021-02-18)

Fixes: #21892
2021-03-10 09:07:44 +11:00
Brad King
ed7a87f270 Tests: Update RunCMake.Android for NDK r22
Use `CMAKE_ANDROID_NDK_VERSION` to check for files expected based
on the version of the NDK.
2021-03-03 10:27:50 -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
75d7329adb Merge topic 'preset-no-comments' into release-3.20
06e16ea008 Merge branch 'backport-3.19-preset-no-comments' into preset-no-comments
afaa69f5b3 Tests: Remove comments from CMakePresetsTest/Good.json.in
4a92277f45 Revert "Help: Document JSON comment support in cmake-presets(7)"
431dd59b5e CMakePresets.json: Remove undocumented support for comments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5853
2021-02-24 09:42:00 -05:00
Brad King
cf21ea2ce6 Merge topic 'ninja-status-stderr' into release-3.20
d33c2c93d8 Tests: Update for upstream ninja change to write status on stderr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5850
2021-02-24 09:41:03 -05:00
Brad King
fcf0c66b5a Merge branch 'backport-3.19-preset-no-comments' into release-3.19
Merge-request: !5853
2021-02-24 09:39:20 -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
afaa69f5b3 Tests: Remove comments from CMakePresetsTest/Good.json.in 2021-02-24 09:33:50 -05:00
Kyle Edwards
431dd59b5e CMakePresets.json: Remove undocumented support for comments
Fixes: #21858
2021-02-24 09:28:36 -05:00
Brad King
d33c2c93d8 Tests: Update for upstream ninja change to write status on stderr
Upstream ninja commit `ad3d29fb53` (Put builder output through status
interface) from ninja PR 1899 changed the status output from stdout to
stderr.  In particular, `ninja: no work to do` is now printed on stderr.
Update our RunCMake tests to accept this difference.

A few RunCMake test cases check for `ninja: no work to do`.  For those,
move the message to stdout using `RunCMake_TEST_OUTPUT_MERGE`.  The rest
of the test cases do not care about the message, so remove it from the
actual stderr content before comparing against that expected.
2021-02-23 10:55:12 -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