-
Hi, What is the best way to have a common .build file that sets common variables for unrelated projects I make, to avoid rewriting the same rules every time in each top project directory. Please note, those projects are independent. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
I am not sure if ny request was clear: I would like to have a file with compiler options, that I commonly use among multiple projects. And I would like to import those files in the current project dir to be able to pick what I want from them. Like a dictionary meson could understand. Thanks |
Beta Was this translation helpful? Give feedback.
-
Meson cannot include a file, it can only do subdir(). If your projects have a common subdir that could do the trick. This has been requested many times e.g. #3557. The main reason for not allowing that is because we don't want people to turn that feature into some form of function implementation. Most of the time when there is a need for this it means we should rather add API in meson to avoid it, which benefit everyone instead. |
Beta Was this translation helpful? Give feedback.
Meson cannot include a file, it can only do subdir(). If your projects have a common subdir that could do the trick.
This has been requested many times e.g. #3557. The main reason for not allowing that is because we don't want people to turn that feature into some form of function implementation. Most of the time when there is a need for this it means we should rather add API in meson to avoid it, which benefit everyone instead.