summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/cl.lua5
-rw-r--r--xmake/modules/core/tools/gcc.lua7
2 files changed, 10 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 7bbb6ff8b..c4cf109bf 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -454,7 +454,10 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
end
end
end
- os.raise(results)
+ if not option.get("verbose") then
+ results = results .. "\n ${yellow}> in ${bright}" .. sourcefile
+ end
+ raise(results)
end
},
finally
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 240ec2855..a871f62e5 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -494,7 +494,12 @@ function compile(self, sourcefile, objectfile, dependinfo, flags)
end
-- raise compiling errors
- raise(#lines > 0 and table.concat(lines, "\n") or "")
+ local results = #lines > 0 and table.concat(lines, "\n") or ""
+ if not option.get("verbose") then
+ results = results .. "\n ${yellow}> in ${bright}" .. sourcefile
+ end
+ raise(results)
+
end
},
finally