summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSaikari <[email protected]>2026-01-30 20:42:57 +0300
committerSaikari <[email protected]>2026-01-30 20:42:57 +0300
commitb006af493bff65fcffd198db70ec2c8046f6575e (patch)
tree6e40e74d2a966cc40160c713f3947f5edb5d2620 /tests
parent51a68ee33918b95811420beb6a56673a83abe6cc (diff)
enhance compile_commands support and add test cases
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)