docs: document default_options behaviour

As discussed in issue #8037, using `c_args` in `project()` leads to
`CFLAGS` not being respected, which is a common mistake. Document this
and suggest using `add_project_arguments()` instead.

Signed-off-by: John Levon <levon@movementarian.org>
This commit is contained in:
John Levon 2023-02-25 15:35:32 +00:00 committed by Dylan Baker
parent 8833513f57
commit a952b01a08
1 changed files with 5 additions and 0 deletions

View File

@ -49,6 +49,11 @@ kwargs:
the master project, settings in subprojects are ignored. Project
specific options are used normally even in subprojects.
Note that some options can override the default behavior;
for example, using `c_args` here means that the `CFLAGS`
environment variable is not used. Consider using
[[add_project_arguments()]] instead.
version:
type: str | file
description: |