From 663b433c81423b438ed17bf682f0432eb690ffb9 Mon Sep 17 00:00:00 2001 From: RimuruChan <42002296+RimuruChan@users.noreply.github.com> Date: Fri, 5 Jan 2024 19:52:03 +0800 Subject: fix: fix #4555 --- xmake/modules/core/tools/cl.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 5aad46d82..2d267f508 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -386,7 +386,7 @@ function nf_pcheader(self, pcheaderfile, opt) if objectfiles then table.insert(objectfiles, target:pcoutputfile("c") .. ".obj") end - return {"-Yu" .. path.filename(pcheaderfile), "-FI" .. path.filename(pcheaderfile), "-Fp" .. target:pcoutputfile("c")} + return {"-Yu" .. path.absolute(pcheaderfile), "-FI" .. path.absolute(pcheaderfile), "-Fp" .. target:pcoutputfile("c")} end end @@ -398,7 +398,7 @@ function nf_pcxxheader(self, pcheaderfile, opt) if objectfiles then table.insert(objectfiles, target:pcoutputfile("cxx") .. ".obj") end - return {"-Yu" .. path.filename(pcheaderfile), "-FI" .. path.filename(pcheaderfile), "-Fp" .. target:pcoutputfile("cxx")} + return {"-Yu" .. path.absolute(pcheaderfile), "-FI" .. path.absolute(pcheaderfile), "-Fp" .. target:pcoutputfile("cxx")} end end -- cgit v1.3.1