Explicitly mention that the project definition is invalid, and clarify that project is `project()` -- a function. Also try to walk the directory tree upward, and if there are parent meson.build files, just say this isn't the project root, and "maybe you meant to run meson there instead?" This won't catch calls to subdir('foo/bar') but we can't be perfect, only better than before and catch the *majority* of such cases, and hopefully it's a lot more clear if meson protests that the project is "invalid, there is no project() function", where the user should look for a potential solution. Fixes #3426pull/9148/head
parent
db04a3f5f2
commit
5a7b8d86d0
2 changed files with 15 additions and 3 deletions
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "ERROR: First statement must be a call to project" |
||||
"line": "ERROR: Invalid source tree: first statement must be a call to project()" |
||||
} |
||||
] |
||||
} |
||||
|
Loading…
Reference in new issue