diff options
| author | ruki <[email protected]> | 2015-06-16 18:27:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-16 18:27:00 +0800 |
| commit | d549aaedf96e6d6eb77e9d588dc0a0269cd1ae71 (patch) | |
| tree | 51d971fe326561b62895743a38a1544af6df2dff /xmake/scripts/platform/windows/tools/cl.lua | |
| parent | 608602d0de1056f856e0b6bfe33b3f5fbe641b63 (diff) | |
fix the command is too long for nmake
Diffstat (limited to 'xmake/scripts/platform/windows/tools/cl.lua')
| -rw-r--r-- | xmake/scripts/platform/windows/tools/cl.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xmake/scripts/platform/windows/tools/cl.lua b/xmake/scripts/platform/windows/tools/cl.lua index 0d94f7800..e6306fccb 100644 --- a/xmake/scripts/platform/windows/tools/cl.lua +++ b/xmake/scripts/platform/windows/tools/cl.lua @@ -55,6 +55,10 @@ function cl.init(self, name) , ["-fvisibility=.*"] = "" -- warnings + , ["-Wall"] = "-Wall" + , ["-W1"] = "-W1" + , ["-W2"] = "-W2" + , ["-W3"] = "-W3" , ["-Werror"] = "-WX" , ["%-Wno%-error=.*"] = "" @@ -80,10 +84,14 @@ function cl.init(self, name) end -- make the compiler command -function cl.command_compile(self, srcfile, objfile, flags) +function cl.command_compile(self, srcfile, objfile, flags, logfile) + + -- redirect + local redirect = "" + if logfile then redirect = string.format(" > %s 2>&1", logfile) end -- make it - return string.format("%s -c %s -Fo%s %s", self._NAME, flags, objfile, srcfile) + return string.format("%s -c %s -Fo%s %s%s", self._NAME, flags, objfile, srcfile, redirect) end -- make the define flag |
