From fa8bcc5ad0405a6749fe3a53a5d019d5ff7c6747 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 13 Jun 2022 22:39:51 +0800 Subject: fix warnings for cccache --- xmake/modules/core/tools/cl.lua | 5 ++++- xmake/modules/core/tools/gcc.lua | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 1e7556808..6c558ce6b 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -494,7 +494,10 @@ end -- compile preprocessed file function _compile_preprocessed_file(program, cppinfo, opt) - vstool.iorunv(program, winos.cmdargv(table.join(cppinfo.cppflags, "-Fo" .. cppinfo.objectfile, cppinfo.cppfile)), opt) + local outdata, errdata = vstool.iorunv(program, winos.cmdargv(table.join(cppinfo.cppflags, "-Fo" .. cppinfo.objectfile, cppinfo.cppfile)), opt) + -- we need get warning information from output + cppinfo.outdata = outdata + cppinfo.errdata = errdata end -- do compile diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 53c283a39..00414c387 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -507,7 +507,10 @@ end -- compile preprocessed file function _compile_preprocessed_file(program, cppinfo, opt) - os.iorunv(program, table.join(cppinfo.cppflags, "-o", cppinfo.objectfile, cppinfo.cppfile), opt) + local outdata, errdata = os.iorunv(program, table.join(cppinfo.cppflags, "-o", cppinfo.objectfile, cppinfo.cppfile), opt) + -- we need get warning information from output + cppinfo.outdata = outdata + cppinfo.errdata = errdata end -- do compile -- cgit v1.3.1