Commit Graph

34428 Commits

Author SHA1 Message Date
Kitware Robot
e162bbc8cb CMake Nightly Date Stamp 2023-08-10 00:01:12 -04:00
Brad King
5ed03aa07a Merge topic 'add-cm-fileno'
fbdb1fd843 Source: Add cm_fileno wrapper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8686
2023-08-09 11:36:07 -04:00
Kitware Robot
e525f85640 CMake Nightly Date Stamp 2023-08-09 00:01:12 -04:00
Brad King
c05d06c6ed Merge topic 'file-GENERATE-arg-parsing'
88f90a72f1 file(GENERATE): Restore INPUT|CONTENT parse checking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8694
2023-08-08 10:06:39 -04:00
Brad King
1b42365bb3 Merge topic 'cmList-append-regression'
ee5edf77db Merge branch 'backport-3.27-cmList-append-regression' into cmList-append-regression
a9a34edc82 cmList: Fix performance regression in append/prepend
7f9f96151a cmList: Fix performance regression in append/prepend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8684
2023-08-08 09:39:05 -04:00
Kitware Robot
ed0450ed8a CMake Nightly Date Stamp 2023-08-08 00:01:11 -04:00
Evan Wilde
88f90a72f1 file(GENERATE): Restore INPUT|CONTENT parse checking
Refactoring in commit bff468c988 (cmFileCommand: Use cm::optional for
keyword argument presence, 2022-06-30, v3.25.0-rc1~512^2) accidentally
broke the check that the input argument is either `INPUT` or `CONTENT`.

The check is supposed to fail when arguments are passed in the wrong
order.  For example:

    file(GENERATE OUTPUT ...
         TARGET <target>
         CONTENT <content>)

Prior to this fix, the input method would be CONTENT, but because the
first parsed keyword is not `CONTENT`, `inputIsContent` would be false.
The first parsed keyword isn't INPUT either, so we would not continue
into the error condition. CMake would then try to handle this as an
input file, when there isn't one, resulting in uninitialized memory
usage and segfaults or corruption later on.

Fixes: #25169
2023-08-07 19:17:29 -04:00
Craig Scott
feca1d51ff Merge topic 'doc-fixups-release-3.27'
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment
1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS
91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY
03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8688
2023-08-07 18:10:56 -04:00
Brad King
efb21962fb Merge topic 'cxxmodules-try-compile'
be53c75852 cmExperimental: recycle the C++ modules API UUID
deb1c3cbd5 cmCoreTryCompile: forward module-related binutils variables
b768d293c5 cmCoreTryCompile: use the source type context for source files
93993c7ad4 cmArgumentParser: support storing a context value with parsing
c9ca5f6326 cmCoreTryCompile: parse `SOURCES_TYPE` argument
07551f35de cmCoreTryCompile: use `target_sources` for `try_compile` targets
aad9033b56 cmExperimental: support forwarding associated variables to `try_compile`
f6cf433256 cmExperimental: only forward C++ module support to non-ABI checks
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8639
2023-08-07 11:57:00 -04:00
Brad King
ade507f64c Merge topic 'set-CACHE-diagnostics'
20c23518d9 set: Improve diagnostics for CACHE mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8679
2023-08-07 11:53:39 -04:00
Brad King
cb75716e4e Merge topic 'revert-vs-show-cmake-files'
1972a7b6e3 Merge branch 'backport-revert-vs-show-cmake-files'
0d1529000d VS: Revert "Add CMake input files to ZERO_CHECK"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8681
2023-08-07 11:34:05 -04:00
Kyle Edwards
fbdb1fd843 Source: Add cm_fileno wrapper
And use it where appropriate.
2023-08-07 11:26:05 -04:00
Kitware Robot
87599d0bad CMake Nightly Date Stamp 2023-08-07 00:01:43 -04:00
Craig Scott
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment 2023-08-06 18:23:24 +10:00
Kitware Robot
d69cde7516 CMake Nightly Date Stamp 2023-08-06 00:01:10 -04:00
Kitware Robot
4b2afa4718 CMake Nightly Date Stamp 2023-08-05 00:01:12 -04:00
Marc Chevrier
a9a34edc82 cmList: Fix performance regression in append/prepend
Fixes: #25147
2023-08-04 09:55:47 +02:00
Kitware Robot
21edd5af1f CMake Nightly Date Stamp 2023-08-04 00:01:16 -04:00
Kitware Robot
6a07695e42 CMake Nightly Date Stamp 2023-08-03 00:01:12 -04:00
Brad King
1972a7b6e3 Merge branch 'backport-revert-vs-show-cmake-files' 2023-08-02 12:11:11 -04:00
Brad King
0d1529000d VS: Revert "Add CMake input files to ZERO_CHECK"
Since commit df58dbb0e9 (VS: Add CMake input files to ZERO_CHECK,
2023-03-19, v3.27.0-rc1~157^2), projects that specify the same file both
as input to `configure_file` and as the `MAIN_DEPENDENCY` of a custom
command fail to configure.  Revert the change pending further
investigation.  Add a test case demonstrating the problem.

Issue: #24557
Fixes: #25149
2023-08-02 11:53:48 -04:00
Jeremy
20c23518d9 set: Improve diagnostics for CACHE mode
Improve `set()` diagnostics to be more specific than

    given invalid arguments for CACHE mode
2023-08-02 10:07:56 -04:00
Brad King
735c305ba7 Merge topic 'object-library-link-entries'
2c7acd34e2 cmComputeLinkInformation: add `OBJECT` libraries as link items
e166bbef7b cmComputeLinkInformation: prepare Item consumers for `OBJECT` libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8651
2023-08-02 09:22:46 -04:00
Kitware Robot
1cba4f1128 CMake Nightly Date Stamp 2023-08-02 00:01:18 -04:00
Ben Boeckel
2c7acd34e2 cmComputeLinkInformation: add OBJECT libraries as link items
This completes the transition started in commit b665966933
(cmComputeLinkInformation: track OBJECT library dependencies,
2023-07-22).
2023-08-01 10:06:02 -04:00
Ben Boeckel
e166bbef7b cmComputeLinkInformation: prepare Item consumers for OBJECT libraries
After b665966933 (cmComputeLinkInformation: track `OBJECT` library
dependencies, 2023-07-22), introduced in !8645 as a fix for #25112,
`OBJECT` libraries were tracked in a separate member to reduce the risk
of further regressions. This commit prepares consumers to handle
`OBJECT` libraries once they start appearing as link items.
2023-08-01 10:06:02 -04:00
Brad King
17dcd9424a Merge topic 'xcode-embed-resources'
e40d2cb3af Xcode: Add embed resources support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Deal <halx99@live.com>
Merge-request: !8632
2023-08-01 09:33:15 -04:00
Brad King
d8b6a750a0 Merge topic 'windows-tidy-cmstrcat'
d58253d155 clang-tidy: fix `performance-faster-string-find` lints
a19ec77200 clang-tidy: fix `readability-static-accessed-through-instance` lints
3d03629f20 cmWIXRichTextFormatWriter: remove identity cast
1df29567ac clang-tidy: fix `modernize-use-equals-default` lints
32fe862b8c clang-tidy: fix `readability-container-size-empty` lints
7eaab9a957 clang-tidy: fix `modernize-raw-string-literal` lints
ffa49c23aa clang-tidy: fix `readability-else-after-return` lints
4489e9a85c clang-tidy: fix `modernize-use-auto` lints
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8668
2023-08-01 09:31:45 -04:00
Brad King
08c637423c Merge topic 'clang-tidy-xcode-generator'
09b7ac7f67 strings: use single characters where possible
6aa9023700 string_view: use string_view literals in comparisons
1b60137b98 strings: combine string literals
e1b70d7286 cmCPackDragNDropGenerator: use a string instead of a stream for commands
f5d04b5bf0 cmStrCat: use where possible in Apple-specific sources
3af822cd8f cmXCode21Object: simplify streaming expression
c4f751604b cmLocalXCodeGenerator: return a default string
ce549909fb cmCPackPKGGenerator: remove unnecessary `.c_str()` calls
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8660
2023-08-01 09:30:55 -04:00
Kitware Robot
823436a41c CMake Nightly Date Stamp 2023-08-01 00:01:10 -04:00
Ben Boeckel
be53c75852 cmExperimental: recycle the C++ modules API UUID
`try_compile` and `try_run` now support C++ modules.
2023-07-31 11:59:50 -04:00
Ben Boeckel
deb1c3cbd5 cmCoreTryCompile: forward module-related binutils variables 2023-07-31 11:59:50 -04:00
Ben Boeckel
b768d293c5 cmCoreTryCompile: use the source type context for source files
Also add a test to `RunCMake/CXXModules` to test `try_compile` with C++
modules.

Fixes: #25097
2023-07-31 11:59:47 -04:00
Ben Boeckel
93993c7ad4 cmArgumentParser: support storing a context value with parsing
This allows for parsing of contextual keywords. For example:

```
some_command(
  ARG_WITH_CONTEXT foo
  CONTEXT bar
  ARG_WITH_CONTEXT quux)
```

will be able to store that `foo` happened without context (or, rather,
its default value) and `quux` was provided in a `bar` context.
2023-07-31 11:37:47 -04:00
Ben Boeckel
c9ca5f6326 cmCoreTryCompile: parse SOURCES_TYPE argument
This will serve to add context for the source listing in order to
properly mark sources as `FILE_SET TYPE CXX_MODULES` in the generated
code.
2023-07-31 11:37:47 -04:00
Ben Boeckel
07551f35de cmCoreTryCompile: use target_sources for try_compile targets
In order to support using C++ module sources in `try_compile`,
`target_sources` will be required. To prepare, always use the command.
2023-07-31 11:37:47 -04:00
Ben Boeckel
aad9033b56 cmExperimental: support forwarding associated variables to try_compile
Other variables may be needed to make experimental features actually
work. List them with the experimental flag.
2023-07-31 11:37:47 -04:00
Ben Boeckel
f6cf433256 cmExperimental: only forward C++ module support to non-ABI checks
ABI checks never use modules, so don't forward the experimental status
through.
2023-07-31 11:37:47 -04:00
Ben Boeckel
1a538ae07c cmExperimental: use an enum for whether to forward to try_compile 2023-07-31 11:37:47 -04:00
Brad King
7518fd6074 Merge topic 'test-target-property-init'
b66c494ca4 Tests/RunCMake/property_init: test 'with_exports' properties
efad4391e5 Tests/RunCMake/property_init: test 'with_commands' properties
5f1bf85f84 Tests/RunCMake/property_init: test 'with_artifact' properties
02972ed9e8 Tests/RunCMake/property_init: test 'shared_library' properties
653a32aa72 Tests/RunCMake/property_init: test 'pic_targets' properties
141049cf16 Tests/RunCMake/property_init: test 'normal' properties
bc318ceb7f Tests/RunCMake/property_init: test 'non_imported' properties
0b56e3fedd Tests/RunCMake/property_init: test 'normal_non_imported' properties
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8655
2023-07-31 10:50:23 -04:00
Brad King
307b2dbadd Merge topic 'ci-debian-12'
241ee252ce IWYU: Update for Debian 12 CI job
09db788636 ci: use Debian 12 images and environments
9526679bbc ci: Update base images to Debian 12

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8669
2023-07-31 10:42:01 -04:00
Kitware Robot
beebc77992 CMake Nightly Date Stamp 2023-07-31 00:01:56 -04:00
halx99
e40d2cb3af Xcode: Add embed resources support 2023-07-31 09:08:10 +08:00
Ben Boeckel
d58253d155 clang-tidy: fix performance-faster-string-find lints 2023-07-30 20:19:49 -04:00
Ben Boeckel
a19ec77200 clang-tidy: fix readability-static-accessed-through-instance lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
3d03629f20 cmWIXRichTextFormatWriter: remove identity cast 2023-07-30 20:19:48 -04:00
Ben Boeckel
1df29567ac clang-tidy: fix modernize-use-equals-default lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
32fe862b8c clang-tidy: fix readability-container-size-empty lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
7eaab9a957 clang-tidy: fix modernize-raw-string-literal lints 2023-07-30 20:19:48 -04:00
Ben Boeckel
09b7ac7f67 strings: use single characters where possible 2023-07-30 18:33:07 -04:00