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>
pull/11481/head
John Levon 2 years ago committed by Dylan Baker
parent 8833513f57
commit a952b01a08
  1. 5
      docs/yaml/functions/project.yaml

@ -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: |

Loading…
Cancel
Save