From f85b045eb366fce9c87522c84a29dbf6b905c1fe Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 28 Nov 2024 23:36:07 +0800 Subject: fix gcc pcheaders #5858 --- xmake/modules/core/tools/gcc.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xmake/modules/core/tools/gcc.lua') diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 2ff5be449..821bd9910 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -497,7 +497,7 @@ function nf_pcheader(self, pcheaderfile, opt) if self:name() == "clang" then return {"-include", pcheaderfile, "-include-pch", pcoutputfile} else - return {"-include", path.filename(pcheaderfile), "-I", path.directory(pcoutputfile)} + return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)} end end end @@ -510,7 +510,7 @@ function nf_pcxxheader(self, pcheaderfile, opt) if self:name() == "clang" then return {"-include", pcheaderfile, "-include-pch", pcoutputfile} else - return {"-include", path.filename(pcheaderfile), "-I", path.directory(pcoutputfile)} + return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)} end end end @@ -523,7 +523,7 @@ function nf_pmheader(self, pcheaderfile, opt) if self:name() == "clang" then return {"-include", pcheaderfile, "-include-pch", pcoutputfile} else - return {"-include", path.filename(pcheaderfile), "-I", path.directory(pcoutputfile)} + return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)} end end end @@ -536,7 +536,7 @@ function nf_pmxxheader(self, pcheaderfile, opt) if self:name() == "clang" then return {"-include", pcheaderfile, "-include-pch", pcoutputfile} else - return {"-include", path.filename(pcheaderfile), "-I", path.directory(pcoutputfile)} + return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)} end end end -- cgit v1.3.1