Skip to content

Conversation

@spotandjake
Copy link
Member

@spotandjake spotandjake commented Oct 21, 2025

I don't think the diff is very helpful for a code review on this pr it's probably better to check my changes here Kitware/CMake@master...spotandjake:CMake:master

I reforked cmake from the latest release 4.1.2 and applied the same changes that make this patch for 3.27.4 work. The advantage of this is better compatbility with newer toolchains such as the latest version of clang.

This seems like a better way of fixing the clang 17 issues we fixed in #1

We don't really have tests setup for this repo so I added a basic test to build with esy and verified that our upstream libbinaryen builds here: https://github.com/spotandjake/libbinaryen/actions/runs/18693766744/job/53305778962

I'm not entirely sure what the best way to merge this is, ideally we would just force ignore the conflicts here as they have different roots.

mathstuf and others added 30 commits June 11, 2025 20:07
When projects explicitly unset variables, the transition detection can
end up reporting events when they are not desired.

See: #24833
7ce9556 CPack/NuGet: Set correct version for test case CPack NuGet Lib

Acked-by: Kitware Robot <[email protected]>
Merge-request: !10873
a0cfaaf Help: Note when `<project>_COMPAT_VERSION` were added

Acked-by: Kitware Robot <[email protected]>
Merge-request: !10872
c42d82d find_*: support suppressing implicit transition events
64f429c Help/dev: add release note for implicit configure log find events
4cd8333 cmFindCommon: fix comment after renaming the `FullDebugMode` member

Acked-by: Kitware Robot <[email protected]>
Tested-by: buildbot <[email protected]>
Merge-request: !10874
Fix a minor error in the explanatory example in the documentation of the
CMAKE_PROJECT_COMPAT_VERSION property.
When installing FILE_SETs, it is possible the FILE_SET has not yet been
created with target_sources(FILE_SET). Instead of ignoring this
situation, we need to track the installed FILE_SET names and their
possible install destinations.

At generation time we resolve the names and destinations concretely. If
a FILE_SET wasn't provided or isn't an INTERFACE, we silently bail out.

Fixes: #26697
Changes:
- BZip2 versions before 1.0.2 required `<stdio.h>` header file to be
  included before `bzlib.h` for the FILE definition.
- Described `BZIP2_NEED_PREFIX` in more details.
d71b59a install(TARGETS): Don't ignore non-extant file sets

Acked-by: Kitware Robot <[email protected]>
Tested-by: buildbot <[email protected]>
Reviewed-by: Ben Boeckel <[email protected]>
Merge-request: !10878
After a recent update, CYGWIN no longer seems to recognize execute
permission without read permission.
Refactor cmPackageInfoArguments::Check to use helper macros for
repetitive argument validation.
Add validation of recently added `DESCRIPTION` and `HOMEPAGE_URL`
arguments to `export`/`install` commands.
Extend commit 844d799 (cmake --build: Add support for driving Xcode
workspaces, 2025-06-02) to support multiple `--target` arguments.
`xcodebuild -scheme` cannot be repeated in a single call, so call it
multiple times instead.

Issue: #26958

Co-Authored-By: Craig Scott <[email protected]>
bradking and others added 20 commits September 22, 2025 10:14
77570a1 GenEx: Consolidate target property evaluation context arguments
1735b0d GenEx: Construct cmGeneratorExpressionDAGChecker with full evaluation context
d4d2043 GenEx: Collect evaluation arguments into local Context structures
b40a53e GenEx: Factor out a dedicated evaluation Context structure
e1035dc GenEx: Rename cmGeneratorExpressionContext to cm::GenEx::Evaluation
905cfcf cmGeneratorExpressionNode: Simplify EvaluateDependentExpression signature
fe8e820 cmGeneratorExpressionEvaluationFile: Constify some local generator usage
8321178 cmFileSet: Constify local generator usage

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !11224
This was left out of commit b3da9c6 (GenEx: Evaluate LINK_LIBRARIES
target properties transitively, 2025-02-24, v4.1.0-rc1~731^2).

Issue: #27220
e8d779c Help: Document when policy CMP0189 takes effect

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11230
Policy CMP0189, introduced by commit b3da9c6 (GenEx: Evaluate
LINK_LIBRARIES target properties transitively, 2025-02-24,
v4.1.0-rc1~731^2), takes effect at generation time, and so uses the
policy value as of the end of each directory.  However, some projects
may rely on `file(GENERATE)` with the policy's OLD behavior in order
to extract targets' *direct* dependencies from `LINK_LIBRARIES`.
Pending a first-class solution to that problem, make it easier for
projects to port to the policy's NEW behavior in general while
retaining the OLD behavior in an isolated context.

Fixes: #27220
deb7b4b file(GENERATE): Record CMP0189 at each call site
9b862e7 cmGeneratorTarget: Pass genex evaluation context to IsTransitiveProperty

Acked-by: Kitware Robot <[email protected]>
Tested-by: buildbot <[email protected]>
Merge-request: !11234
Avoid including a header for a subclass whose implementation is not
compiled during bootstrap.

Fixes: #27256
ea04e19 bootstrap: Fix compilation with gcc 16 devirtualization

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11243
ea04e19 bootstrap: Fix compilation with gcc 16 devirtualization

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11243
ea04e19 bootstrap: Fix compilation with gcc 16 devirtualization

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11243
…ARIES>`

In general we disallow references to transitive target properties, such
as `COMPILE_DEFINITIONS`, in `[INTERFACE_]LINK_LIBRARIES` properties,
because the latter establish the transitivity itself.  Prior to CMP0189,
the `[INTERFACE_]LINK_LIBRARIES` properties were not themselves transitive
in `$<TARGET_PROPERTY>` expressions, so existing projects have code like

    target_link_libraries(foo PRIVATE "$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>")

Policy CMP0189's NEW behavior, introduced by commit b3da9c6 (GenEx:
Evaluate LINK_LIBRARIES target properties transitively, 2025-02-24,
v4.1.0-rc1~731^2), makes `$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>`
transitive, causing the above to be rejected.  Since evaluation of a
target's link libraries can already encounter and handle other targets'
link libraries, allow it in this case.

Fixes: #27265
e0bbe79 CMP0189: Restore support for linking `$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>`
cb69f75 cmGeneratorTarget: Factor out helper to detect LINK_LIBRARIES evaluation

Acked-by: Kitware Robot <[email protected]>
Tested-by: buildbot <[email protected]>
Merge-request: !11262
@ospencer
Copy link
Member

This looks good to me. Can you fix the newline at the end of the file for the gitignore, esy.json, and esy.yml?
Also, the conflicts seem to be in our additional files. You can just resolve those.

@spotandjake spotandjake force-pushed the master branch 2 times, most recently from 8b3bde4 to 89b10de Compare October 22, 2025 02:55
@ospencer ospencer changed the title feat: Update cmake to 4.1.2 feat!: Update cmake to 4.1.2 Oct 22, 2025
@ospencer ospencer merged commit 033cab6 into grain-lang:master Oct 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.