Skip to content

Commit

Permalink
fix gcc pcheaders #5858
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Nov 28, 2024
1 parent 2c973f5 commit f85b045
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion xmake/languages/c++/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ language("c++")
, "target.vectorexts:check"
, "target.languages"
, "target.runtimes"
, "target.pcxxheader"
, "target.includedirs"
, "target.defines"
, "target.undefines"
, "target.frameworkdirs"
, "target.frameworks"
, "target.exceptions"
, "target.encodings"
, "target.pcxxheader"
, "target.forceincludes"
, "toolchain.includedirs"
, "toolchain.defines"
Expand Down
2 changes: 1 addition & 1 deletion xmake/languages/c/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ language("c")
, "target.vectorexts:check"
, "target.languages"
, "target.runtimes"
, "target.pcheader"
, "target.includedirs"
, "target.defines"
, "target.undefines"
, "target.frameworkdirs"
, "target.frameworks"
, "target.exceptions"
, "target.encodings"
, "target.pcheader"
, "target.forceincludes"
, "toolchain.includedirs"
, "toolchain.defines"
Expand Down
4 changes: 2 additions & 2 deletions xmake/languages/objc++/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ language("objc++")
, "target.optimize:check"
, "target.vectorexts:check"
, "target.languages"
, "target.pmheader"
, "target.pmxxheader"
, "target.includedirs"
, "target.defines"
, "target.undefines"
, "target.frameworkdirs"
, "target.frameworks"
, "target.exceptions"
, "target.encodings"
, "target.pmheader"
, "target.pmxxheader"
, "target.forceincludes"
, "toolchain.includedirs"
, "toolchain.defines"
Expand Down
8 changes: 4 additions & 4 deletions xmake/modules/core/tools/gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f85b045

Please sign in to comment.