From fd9f56c58d90b32f690f8d1202b95bec59697379 Mon Sep 17 00:00:00 2001 From: F1ssi0N Date: Wed, 21 Mar 2018 21:43:58 +0000 Subject: [PATCH] Fix premake script copying compile commands on windows (#24) * Test new premake config for compile_commands on windows * Update premake config to call into cmd --- premake5.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/premake5.lua b/premake5.lua index 83b19bb..d81b803 100644 --- a/premake5.lua +++ b/premake5.lua @@ -72,5 +72,10 @@ workspace "doghook" "{TOUCH} %{wks.location}/compile_commands/%{cfg.shortname}.json", "{COPY} %{wks.location}/compile_commands/%{cfg.shortname}.json ../compile_commands.json" } - filter {} + filter "system:windows" + postbuildcommands { + "cmd.exe /c \"" .. "{MKDIR} %{wks.location}/compile_commands/", + "cmd.exe /c \"" .. "{TOUCH} %{wks.location}/compile_commands/%{cfg.shortname}.json", + "cmd.exe /c \"" .. "{COPY} %{wks.location}/compile_commands/%{cfg.shortname}.json ../compile_commands.json*" + }