aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/239 includedir violation
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/239 includedir violation')
-rw-r--r--meson/test cases/common/239 includedir violation/meson.build11
-rw-r--r--meson/test cases/common/239 includedir violation/subprojects/sub/include/placeholder.h3
-rw-r--r--meson/test cases/common/239 includedir violation/subprojects/sub/meson.build3
-rw-r--r--meson/test cases/common/239 includedir violation/test.json9
4 files changed, 26 insertions, 0 deletions
diff --git a/meson/test cases/common/239 includedir violation/meson.build b/meson/test cases/common/239 includedir violation/meson.build
new file mode 100644
index 000000000..0216be6ef
--- /dev/null
+++ b/meson/test cases/common/239 includedir violation/meson.build
@@ -0,0 +1,11 @@
+project('foo', 'c')
+
+# It is fine to include the root source dir
+include_directories('.')
+subproject('sub')
+
+# This is here rather than in failing because this needs a
+# transition period to avoid breaking existing projects.
+# Once this becomes an error, move this under failing tests.
+
+inc = include_directories('subprojects/sub/include')
diff --git a/meson/test cases/common/239 includedir violation/subprojects/sub/include/placeholder.h b/meson/test cases/common/239 includedir violation/subprojects/sub/include/placeholder.h
new file mode 100644
index 000000000..196f917e4
--- /dev/null
+++ b/meson/test cases/common/239 includedir violation/subprojects/sub/include/placeholder.h
@@ -0,0 +1,3 @@
+#pragma once
+
+// Git can not handle empty directories, so there must be something here.
diff --git a/meson/test cases/common/239 includedir violation/subprojects/sub/meson.build b/meson/test cases/common/239 includedir violation/subprojects/sub/meson.build
new file mode 100644
index 000000000..352f4a261
--- /dev/null
+++ b/meson/test cases/common/239 includedir violation/subprojects/sub/meson.build
@@ -0,0 +1,3 @@
+project('subproj', 'c')
+
+include_directories('.')
diff --git a/meson/test cases/common/239 includedir violation/test.json b/meson/test cases/common/239 includedir violation/test.json
new file mode 100644
index 000000000..fea19a109
--- /dev/null
+++ b/meson/test cases/common/239 includedir violation/test.json
@@ -0,0 +1,9 @@
+{
+ "stdout": [
+ {
+ "line": ".*WARNING: include_directories sandbox violation!",
+ "match": "re",
+ "count": 1
+ }
+ ]
+}