Multiple meson.options files #12240
Replies: 1 comment 4 replies
-
The options file describes what options are available to select, rather that what options the current configuration has selected. Probably you want to do one of the following instead:
My suspicion is you want to use the latter. You could have e.g.
And select a specific profile with Note that machine files can set many things, not just the value of a project option. You can define which compiler to use by full path, select the ld implementation to use (perhaps you prefer lld or mold instead of bfd that is often the compiler's own default), toggle built-in options such as debug/optimization/LTO, set additional directories to have pkg-config search for dependencies in, and more. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am not sure this is an existing feature, or not, so I put this in the idea category.
I am trying to move an automotive embedded project from a cobbled together Make+Java build system to Meson. Part of the build system is the usage of variants, in Meson terms, options. Most projects at the company will compile different configurations of the same source files, the only change is the selected options. This is done to support more than one hardware.
Now, the way I would think to go about this in Meson is to use multiple meson.options files, but as far as I know, there is no way to select one from the command line, or load it from a subdir.(It's a monorepo, so I am not using the subproject feature)
If this really does not exist, I think a command line option when configuring the folder would be nice, for example:
meson configure builddir --option-file=Config27.options
Beta Was this translation helpful? Give feedback.
All reactions