aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-10-27 15:48:32 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2020-11-01 19:26:31 +0200
commit47d071a34f1e1539b1b354cfda309dac1b905232 (patch)
treebc31a740d67259768fea0e9d74069be9c36363f3 /test cases
parentd4eec9664bb96a093b92c3e1f565806686ea0ccb (diff)
downloadmeson-47d071a34f1e1539b1b354cfda309dac1b905232.zip
meson-47d071a34f1e1539b1b354cfda309dac1b905232.tar.gz
meson-47d071a34f1e1539b1b354cfda309dac1b905232.tar.bz2
interpreter: store correct files for project regeneration
Right now sub-sub projects are not correctly registered, because we don't have a way to pass up past the first level of subproject. This patch changes that by making the build_Def_files as defined in the Interpreter initializer accurate for translated dependencies, ie, cmake dependencies won't define a dependency on a non-existent meson.build. This means that it can always add the subi.build_def_files because they are always accurate.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/85 nested subproject regenerate depends/main.c3
-rw-r--r--test cases/unit/85 nested subproject regenerate depends/meson.build6
-rw-r--r--test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build4
-rw-r--r--test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt1
4 files changed, 14 insertions, 0 deletions
diff --git a/test cases/unit/85 nested subproject regenerate depends/main.c b/test cases/unit/85 nested subproject regenerate depends/main.c
new file mode 100644
index 0000000..9b6bdc2
--- /dev/null
+++ b/test cases/unit/85 nested subproject regenerate depends/main.c
@@ -0,0 +1,3 @@
+int main(void) {
+ return 0;
+}
diff --git a/test cases/unit/85 nested subproject regenerate depends/meson.build b/test cases/unit/85 nested subproject regenerate depends/meson.build
new file mode 100644
index 0000000..5698881
--- /dev/null
+++ b/test cases/unit/85 nested subproject regenerate depends/meson.build
@@ -0,0 +1,6 @@
+project('nested subproject regenerate depends', 'c')
+
+s = subproject('sub1')
+
+# This is needed to make msbuild noop check work correctly
+executable('exe', 'main.c')
diff --git a/test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build b/test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build
new file mode 100644
index 0000000..a31db4a
--- /dev/null
+++ b/test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build
@@ -0,0 +1,4 @@
+project('sub1')
+
+cmake = import('cmake')
+cmake.subproject('sub2')
diff --git a/test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt b/test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt
new file mode 100644
index 0000000..f91473a
--- /dev/null
+++ b/test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt
@@ -0,0 +1 @@
+project(sub2)