Commit Graph

36608 Commits

Author SHA1 Message Date
Martin Duffy 6195cefcfe export: Convert ExportInfo to a struct with meaningful field names 2024-12-30 10:59:33 -05:00
Brad King 41cd84174a Merge topic 'makefile-stack-manipulation'
dcaa52c6c3 PrintCallStack: "Fix" entry suppression
a73955ae76 cmMakefile: Allow arbitrary stack manipulation
de5700a15a cmMakefile: Prevent copying RAII helpers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10067
2024-12-09 10:00:52 -05:00
Brad King b66c010033 Merge topic 'refactor-find_package'
e2a6416622 find_package: Refactor in support of recursion
bd542748af find_package: Use map::emplace instead of make_pair

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10054
2024-12-09 09:59:00 -05:00
Brad King 8c53b0be2a Merge topic 'xcode-embed-frameworks'
0282429c5a Xcode: Fix XCODE_EMBED_FRAMEWORKS when settings differ across targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9985
2024-12-09 09:56:10 -05:00
Kitware Robot 29302e11bb CMake Nightly Date Stamp 2024-12-09 00:01:29 -05:00
Kitware Robot 175b74ed0a CMake Nightly Date Stamp 2024-12-08 00:01:39 -05:00
Matthew Woehlke dcaa52c6c3 PrintCallStack: "Fix" entry suppression
Backtraces may contain non-specific entries (n.b. FromListFilePath in
cmListFileContext). Our prior expectation is that these will ALWAYS
replaced by more specific entries. However, with the previous change to
allow users to create arbitrary stack entries, this is no longer the
case. Modify PrintCallStack to only skip printing these non-specific
entries if they were in fact preceded by a more specific entry.

This, and the functionality of the preceding commit, is intended to be
used for CPS dependency resolution. Because said resolution may fail at
a non-trivial depth, it is important to be able to provide the user with
the path of packages that led to the failure. However, because this
happens through parsing JSON, there is no listfile function to associate
with the stack entries, nor do we attempt to keep track of line numbers
from the JSON. As a result, these entries will never be more specific
than the name of the CPS file whose dependencies we are trying to
locate.
2024-12-07 09:12:54 -05:00
Matthew Woehlke a73955ae76 cmMakefile: Allow arbitrary stack manipulation
Create a helper class to allow insertion of arbitrary entries into the
call stack (i.e. not associated with ExecuteCommand, ReadDependentFile,
etc.). Refactor ExecuteCommand helper class to leverage this and to be
named more consistently with similar helpers.
2024-12-07 09:11:45 -05:00
Kitware Robot a5e5064844 CMake Nightly Date Stamp 2024-12-07 00:01:10 -05:00
Aleksei Sapitskii 0282429c5a Xcode: Fix XCODE_EMBED_FRAMEWORKS when settings differ across targets
In commit 5651901c54 (Xcode: add support for embedding frameworks,
2020-10-24, v3.20.0-rc1~402^2) we incorrectly reused `PBXBuildFile`
instances when the same framework is embedded in multiple targets,
causing target-specific settings to conflict.

Fixes: #26438
2024-12-06 09:22:07 -05:00
Kitware Robot 3d535b0969 CMake Nightly Date Stamp 2024-12-06 00:01:13 -05:00
Brad King b932dbe8ed Merge topic 'find_package-fix-sign-conversion'
3f450d2680 find_package: Fix sign-cast warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10064
2024-12-05 08:15:30 -05:00
Brad King ef26f74442 Merge topic 'autogen-revert-ui-rebuild'
debc4d3906 Autogen: Revert adding ui files to byproducts of the timestamp target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10056
2024-12-05 08:10:36 -05:00
Brad King 5d5aca82f1 Merge topic 'linker-prefix-crash'
3993dc4214 Merge branch 'backport-linker-prefix-crash' into linker-prefix-crash
76f4fc7dd0 LINK_OPTIONS: Fix crash on empty LINKER: prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10066
2024-12-05 08:09:26 -05:00
Kitware Robot 33c7db21d1 CMake Nightly Date Stamp 2024-12-05 00:01:27 -05:00
Matthew Woehlke de5700a15a cmMakefile: Prevent copying RAII helpers
Delete copy and assignment operators for public scope helpers in
cmMakefile, as use thereof (at least without careful use of move
constructors, which we don't have) would result in bugs. This helps
guard against improper use, and is consistent with the internal helpers
having these deleted.
2024-12-04 15:59:44 -05:00
Brad King 3993dc4214 Merge branch 'backport-linker-prefix-crash' into linker-prefix-crash 2024-12-04 10:21:32 -05:00
Brad King 76f4fc7dd0 LINK_OPTIONS: Fix crash on empty LINKER: prefix
Since commit e3895f4a8b (Linking: Preserve nested LINKER: prefixes as
written, 2024-09-17, v3.31.0-rc1~60^2) we may increment an iterator past
the end.  Revise logic to avoid that.

Fixes: #26499
2024-12-04 10:16:56 -05:00
Brad King 129c87fb09 Merge topic 'fileapi-no-link-dependency-file'
1a04515a47 fileapi: Do not expose flags for linker-generated dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10061
2024-12-04 08:53:54 -05:00
Brad King 39b96cb0d9 Merge topic 'vs-WindowsKernelModeDriver'
2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
fec276e632 cmVisualStudio10TargetGenerator: Use inline member initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10042
2024-12-04 08:52:56 -05:00
Orkun Tokdemir debc4d3906 Autogen: Revert adding ui files to byproducts of the timestamp target
When `ui_` include directives have different paths than `CMakeLists.txt`,
the dependency graph is not generated correctly.  This is the root cause
of #16776.  However, when #26135 was fixed by commit 5363bebc1e (Autogen:
Fix compilation of unchanged source files, 2024-07-16, v3.31.0-rc1~328^2),
it made #16776 worse: the build is always dirty.  Revert the fix for now.

Fixes: #26485
Issue: #26135
Issue: #25436
2024-12-04 12:37:13 +01:00
Kitware Robot 6a5d305558 CMake Nightly Date Stamp 2024-12-04 00:01:21 -05:00
Matthew Woehlke 3f450d2680 find_package: Fix sign-cast warning
Tweak a helper function to avoid an implicit cast from unsigned to
signed. This is hardly the only -Wsign-conversion we are tripping, but
cmFindPackage is now free of such.
2024-12-03 17:19:39 -05:00
Joseph Snyder 2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
Extend the experimental support for `WindowsKernelModeDriver` to the
Visual Studio generators.  Hard-code some settings for now.
2024-12-03 14:18:52 -05:00
Brad King 1a04515a47 fileapi: Do not expose flags for linker-generated dependencies
In commit 375e6fdbbe (Link step: use linker dependency linker file,
2023-04-19, v3.27.0-rc1~126^2) we added the `-Wl,--dependency-file,...`
flag for the Ninja generator in a code path shared with the file-api.
This flag is a build system implementation detail and should not be
exposed to file-api clients.  Move it to a Ninja-specific code path.

Fixes: #26498
2024-12-03 13:48:57 -05:00
Matthew Woehlke e2a6416622 find_package: Refactor in support of recursion
Separate argument handling and actual operation of the find_package
command into separate methods. This is preparatory to adding improved
support for transitive dependencies and will allow nested calls to be
set up using structured data types, rather than having to perform all
communication via a constructed argument list.

As a consequence, the sets of required and optional components, as well
as the component list string, are now members rather than local
variables. This also allows us to drop some parameters and simplify how
we set the variables indicating which components are required.
2024-12-03 11:15:51 -05:00
Brad King fec276e632 cmVisualStudio10TargetGenerator: Use inline member initialization 2024-12-03 09:43:26 -05:00
Kitware Robot c4d556ccd8 CMake Nightly Date Stamp 2024-12-03 00:01:13 -05:00
Brad King 8a2cdc6ada Merge topic 'normalize-input-paths'
08040ced86 cmake: Look up on-disk case of input paths on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10020
2024-12-02 10:04:55 -05:00
Kitware Robot ae3792fc4c CMake Nightly Date Stamp 2024-12-02 00:02:05 -05:00
YunQiang Su 08040ced86 cmake: Look up on-disk case of input paths on macOS
Follow up commit 1a6015e5fc (PathResolver: Add helper to compute
normalized paths, 2024-10-30) to cover on-disk case lookup on macOS.

Fixes: #26333
2024-12-01 07:12:51 -05:00
Kitware Robot d9b6293d63 CMake Nightly Date Stamp 2024-12-01 00:01:10 -05:00
Kitware Robot 531ae5ea6b CMake Nightly Date Stamp 2024-11-30 00:01:14 -05:00
Matthew Woehlke bd542748af find_package: Use map::emplace instead of make_pair
Replace map::insert(make_pair(...) with map::emplace(...). This should
be slightly more efficient, but also removes one of only two uses of
std::pair. (Upcoming changes are going to remove the other, which will
let us drop use of <utility>.)
2024-11-29 16:15:59 -05:00
Brad King 5aebb62d0c Merge topic 'autogen-ninja-multi-config'
8a526f6a44 Autogen: Fix Ninja Multi-Config dependency graph regression
3cac48e8cd Autogen: Restore <target_name>_autogen_timestamp_deps target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10039
2024-11-29 09:57:21 -05:00
Kitware Robot 34360e5953 CMake Nightly Date Stamp 2024-11-29 00:01:10 -05:00
Brad King 14ed8464c8 Merge topic 'ARCHIVER-prefix'
a4ff2b01e3 IntelLLVM-Windows: add definitions for ARCHIVER: prefix
521a6d409c Archive library: Add support for ARCHIVER: prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10038
2024-11-28 09:22:38 -05:00
Brad King 4bfc22f30a Merge topic 'various-refactorings'
b48d5aeae7 find_*: Improve error message quoting consistency
d6d7ac51c8 cmFindPackageCommand.cxx: Optimize `cmStrCat()` calls
c3c9bc035c cmSearchPath: Drop unused parameter of `ExtractWithout` method
15b0feb704 cmFindCommon.cxx: Small optimizations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10043
2024-11-28 09:20:44 -05:00
Orkun Tokdemir 8a526f6a44 Autogen: Fix Ninja Multi-Config dependency graph regression
In commit 5363bebc1e (Autogen: Fix compilation of unchanged source files,
2024-07-16, v3.31.0-rc1~328^2) we relied on Ninja Multi-Config dependency graph
optimizations from commit 7c39dabdbc (Autogen: AUTO*_EXECUTABLE: add support
for per-config values, 2023-10-18, v3.29.0-rc1~105^2~1).  However, those graph
optimizations are conditional on versions of Qt that enable
[`AUTOGEN_BETTER_GRAPH_MULTI_CONFIG`](https://codereview.qt-project.org/c/qt/qtbase/+/513648).

`UseBetterGraph` should be checked to add ui files to `timestampByproducts`.

Fixes: #26475
2024-11-28 09:13:56 -05:00
Orkun Tokdemir 3cac48e8cd Autogen: Restore <target_name>_autogen_timestamp_deps target
Revert commit 91b2ce4a69 (Autogen: Remove ..._autogen_timestamp_deps
target, 2024-06-27, v3.31.0-rc1~391^2).  The `_autogen_timestamp_deps`
target is needed for pre-`AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` behavior.

Issue: #26080
Issue: #26475
2024-11-28 09:13:46 -05:00
Kitware Robot 8129f9a5b3 CMake Nightly Date Stamp 2024-11-28 00:01:12 -05:00
Brad King 8a0ebc29da Merge topic 'FeatureSummary-condition-syntax'
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10031
2024-11-27 09:08:29 -05:00
Brad King 027bc310f5 Merge topic 'get_filename_component-REALPATH-symlink-parent'
c554437733 get_filename_component: Fix REALPATH for .. after symlink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10025
2024-11-27 09:02:39 -05:00
Alex Turbov b48d5aeae7 find_*: Improve error message quoting consistency
Some error messages (Windows registry related) of the `find_xxx` and
`cmake_host_system_information` commands, reported keywords in quotes,
while most commands did not.
2024-11-27 08:30:15 -05:00
Alex Turbov d6d7ac51c8 cmFindPackageCommand.cxx: Optimize cmStrCat() calls 2024-11-27 08:30:15 -05:00
Alex Turbov c3c9bc035c cmSearchPath: Drop unused parameter of ExtractWithout method
Also,

- Replace `std::set::count()` w/ `find()`
- Replace `push_back` w/ `emplace`
2024-11-27 08:30:14 -05:00
Alex Turbov 15b0feb704 cmFindCommon.cxx: Small optimizations 2024-11-27 08:28:51 -05:00
Kitware Robot 947317f809 CMake Nightly Date Stamp 2024-11-27 00:01:16 -05:00
Marc Chevrier 521a6d409c Archive library: Add support for ARCHIVER: prefix
Add the support of the ARCHIVER: prefix to offer a portable way to pass
options to the archiver when the compiler is used as driver.
2024-11-26 19:26:07 +01:00
Peter Kokot 6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax
Closes: #26468
2024-11-26 13:19:25 -05:00