Skip to content

Conversation

Jan200101
Copy link
Contributor

If a given project uses a generator expression that meson does not support it will change the outcome and potentially result in wrong behavior, the user should be aware of that so they can deal with it.

@Jan200101 Jan200101 requested a review from mensinda as a code owner September 30, 2025 17:46
@dcbaker
Copy link
Member

dcbaker commented Sep 30, 2025

Do we want this to cause meson to stop if --fatal-warnings is set? I'm kinda torn between those two options.

Also, I think it might make sense to request that users open an issue about unsupported generator features? I'm kinda torn on that too because there isn't anyone actively working on that, but at the same time some of those might be easy first issues for people wanting to get started?

@dcbaker dcbaker added the module:cmake Issues related to the cmake module, including cmake.subproject label Sep 30, 2025
@Jan200101
Copy link
Contributor Author

Do we want this to cause meson to stop if --fatal-warnings is set? I'm kinda torn between those two options.

Not sure, meson only supports a fraction of all possible expressions so having it be an error could cause issues when it otherwise works (well enough at least).

Also, I think it might make sense to request that users open an issue about unsupported generator features? I'm kinda torn on that too because there isn't anyone actively working on that, but at the same time some of those might be easy first issues for people wanting to get started?

They all tend to be documented fairly well so I see no reason to open an issue about it.

@dcbaker
Copy link
Member

dcbaker commented Sep 30, 2025

Okay, in that case we should probably add fatal=False to the mlog.warning() call

If a given project uses a generator expression that meson does not
support it will change the outcome and potentially result in wrong
behavior, the user should be aware of that so they can deal with it.
@Jan200101
Copy link
Contributor Author

I've taken the liberty to also add once=True since there is no point in stating the same thing multiple times.

This reduces

luau| WARNING: Unknown generator expression '$<COMPILE_LANGUAGE:CXX>'.
luau| WARNING: Unknown generator expression '$<:LUACODE_API=extern"C">'.
luau| WARNING: Unknown generator expression '$<COMPILE_LANGUAGE:CXX>'.
luau| WARNING: Unknown generator expression '$<:LUACODE_API=extern"C">'.
luau| WARNING: Unknown generator expression '$<COMPILE_LANGUAGE:CXX>'.
luau| WARNING: Unknown generator expression '$<:LUACODEGEN_API=extern"C">'.
luau| WARNING: Unknown generator expression '$<COMPILE_LANGUAGE:CXX>'.
luau| WARNING: Unknown generator expression '$<:LUACODEGEN_API=extern"C">'.
luau| WARNING: Unknown generator expression '$<COMPILE_LANGUAGE:CXX>'.
luau| WARNING: Unknown generator expression '$<:LUA_API=extern"C">'.
luau| WARNING: Unknown generator expression '$<COMPILE_LANGUAGE:CXX>'.
luau| WARNING: Unknown generator expression '$<:LUA_API=extern"C">'.

down to

luau| WARNING: Unknown generator expression '$<COMPILE_LANGUAGE:CXX>'.
luau| WARNING: Unknown generator expression '$<:LUACODE_API=extern"C">'.
luau| WARNING: Unknown generator expression '$<:LUACODEGEN_API=extern"C">'.
luau| WARNING: Unknown generator expression '$<:LUA_API=extern"C">'.

@Jan200101 Jan200101 force-pushed the PR/cmake-unknown-generator-expression branch from 3a535f7 to ae026f6 Compare October 3, 2025 16:26
@dcbaker dcbaker added this to the 1.10 milestone Oct 3, 2025
@dcbaker dcbaker merged commit 2cea370 into mesonbuild:master Oct 3, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:cmake Issues related to the cmake module, including cmake.subproject

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants