summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/projects/policy/compile_commands/src/disabled.c3
-rw-r--r--tests/projects/policy/compile_commands/src/main.c3
-rw-r--r--tests/projects/policy/compile_commands/xmake.lua10
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/projects/policy/compile_commands/src/disabled.c b/tests/projects/policy/compile_commands/src/disabled.c
new file mode 100644
index 000000000..9b130982d
--- /dev/null
+++ b/tests/projects/policy/compile_commands/src/disabled.c
@@ -0,0 +1,3 @@
+int main(int argc, char** argv) {
+ return 0;
+}
diff --git a/tests/projects/policy/compile_commands/src/main.c b/tests/projects/policy/compile_commands/src/main.c
new file mode 100644
index 000000000..9b130982d
--- /dev/null
+++ b/tests/projects/policy/compile_commands/src/main.c
@@ -0,0 +1,3 @@
+int main(int argc, char** argv) {
+ return 0;
+}
diff --git a/tests/projects/policy/compile_commands/xmake.lua b/tests/projects/policy/compile_commands/xmake.lua
new file mode 100644
index 000000000..03f8a788d
--- /dev/null
+++ b/tests/projects/policy/compile_commands/xmake.lua
@@ -0,0 +1,10 @@
+add_rules("mode.debug", "mode.release")
+
+target("enabled")
+ set_kind("binary")
+ add_files("src/main.c")
+
+target("disabled")
+ set_kind("binary")
+ add_files("src/main.c")
+ set_policy("build.compile_commands", false)