From 1d04caff29f675329ecb6491b50578474d71b6f4 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 1 Oct 2020 19:24:15 +0200 Subject: Document search order of find_program --- docs/markdown/Reference-manual.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 3279ddf..563cfe4 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -699,7 +699,10 @@ The returned object also has methods that are documented in the `program_name1` here is a string that can be an executable or script to be searched for in `PATH`, or a script in the current source -directory. +directory. The search order is: program overrides (set via meson.override_find_program()); +subprojects (if wrap_mode is set to `forcefallback`); your project's source tree; +$PATH; the python3 libdir if your command starts with `python3` and finally +subprojects again, if wrap_mode is set to anything but `nofallback`. *(since 0.37.0)* `program_name2` and later positional arguments are used as fallback strings to search for. This is meant to be used for cases where the -- cgit v1.1