summaryrefslogtreecommitdiff
path: root/xmake/plugins/project
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/plugins/project')
-rw-r--r--xmake/plugins/project/clang/compile_commands.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua
index 4cf6eb1ab..b31c9bf93 100644
--- a/xmake/plugins/project/clang/compile_commands.lua
+++ b/xmake/plugins/project/clang/compile_commands.lua
@@ -307,8 +307,10 @@ end
function make(outputdir)
local oldir = os.cd(os.projectdir())
local jsonfile = io.open(path.join(outputdir, "compile_commands.json"), "w")
+ os.setenv("XMAKE_IN_COMPILE_COMMANDS_PROJECT_GENERATOR", "true")
target_cmds.prepare_targets()
_add_targets(jsonfile)
jsonfile:close()
+ os.setenv("XMAKE_IN_COMPILE_COMMANDS_PROJECT_GENERATOR", "false")
os.cd(oldir)
end