mesonbuild / mesonbuild/meson

I want the same feature in CMake: variable_watch

Open
#9,535 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

I transfer from CMake to Meson and accept that Meson has no user defined functions and uses only global variables.

However, I cannot find the similar CMake `variable_watch` function in Meson. I have to spread `warning` function calls in the meson.build files and try to find when and where a variable is used or changed. It is boring and valueless work.

I think it is not hard to add the similar CMake `variable_watch` function in Meson. It is just to add some logic to read and write operations of the global variable table.

variable_watch
https://cmake.org/cmake/help/latest/command/variable_watch.html

Contributor guide

Open the contributing guide

Research direction

Read the linked CMake variable_watch documentation first, then inspect Meson’s global variable table and the warning calls currently spread through meson.build files. Determine the intended behavior for variable reads and writes, including how a watch is registered and what output it should produce. Done means the behavior is defined and verified for the relevant global-variable operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.