diff options
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 9 | ||||
-rw-r--r-- | test cases/failing/44 abspath to srcdir/test.json | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 778a4d6..4191bee 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -2583,8 +2583,9 @@ class Interpreter(InterpreterBase, HoldableObject): for a in incdir_strings: if a.startswith(src_root): raise InvalidArguments(textwrap.dedent('''\ - Tried to form an absolute path to a source dir. - You should not do that but use relative paths instead. + Tried to form an absolute path to a dir in the source tree. + You should not do that but use relative paths instead, for + directories that are part of your project. To get include path to any directory relative to the current dir do @@ -2599,6 +2600,10 @@ class Interpreter(InterpreterBase, HoldableObject): put in the include directories by default so you only need to do include_directories('.') if you intend to use the result in a different subdirectory. + + Note that this error message can also be triggered by + external dependencies being installed within your source + tree - it's not recommended to do this. ''')) else: try: diff --git a/test cases/failing/44 abspath to srcdir/test.json b/test cases/failing/44 abspath to srcdir/test.json index 2cc2980..c64ecfb 100644 --- a/test cases/failing/44 abspath to srcdir/test.json +++ b/test cases/failing/44 abspath to srcdir/test.json @@ -1,7 +1,7 @@ { "stdout": [ { - "line": "test cases/failing/44 abspath to srcdir/meson.build:3:0: ERROR: Tried to form an absolute path to a source dir." + "line": "test cases/failing/44 abspath to srcdir/meson.build:3:0: ERROR: Tried to form an absolute path to a dir in the source tree." } ] } |