diff options
| author | Jérôme Leclercq <[email protected]> | 2021-12-02 11:55:12 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-02 11:55:12 +0100 |
| commit | f29f664a99086e336b40e02dda29d60a22f300e7 (patch) | |
| tree | 78b8a30222d3978c8206905da40d620a570b33e1 | |
| parent | 690d8ae73adb4e568d62c3b082f4b2d079a20bb6 (diff) | |
Add -FC after depends check (fix #1824)
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index d84f4c7c1..14bc19544 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -34,12 +34,6 @@ function init(self) -- init cxflags self:set("cxflags", "-nologo") - -- we need show full file path to goto error position if xmake is called in vstudio - -- https://github.com/xmake-io/xmake/issues/1049 - if os.getenv("XMAKE_IN_VSTUDIO") then - self:add("cxflags", "-FC") - end - -- init flags map self:set("mapflags", { @@ -413,12 +407,19 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) -- generate includes file local compflags = flags + + -- we need show full file path to goto error position if xmake is called in vstudio + -- https://github.com/xmake-io/xmake/issues/1049 + if os.getenv("XMAKE_IN_VSTUDIO") then + compflags = table.join(compflags, "-FC") + end + if dependinfo then if _has_source_dependencies(self) then depfile = os.tmpfile() - compflags = table.join(flags, "/sourceDependencies", depfile) + compflags = table.join(compflags, "/sourceDependencies", depfile) else - compflags = table.join(flags, "-showIncludes") + compflags = table.join(compflags, "-showIncludes") end end @@ -504,4 +505,3 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) end end end - |
