diff --git a/xmake/languages/c++/xmake.lua b/xmake/languages/c++/xmake.lua index 5896dde1c50..5e3121db70c 100644 --- a/xmake/languages/c++/xmake.lua +++ b/xmake/languages/c++/xmake.lua @@ -42,6 +42,7 @@ language("c++") , "target.vectorexts:check" , "target.languages" , "target.runtimes" + , "target.pcxxheader" , "target.includedirs" , "target.defines" , "target.undefines" @@ -49,7 +50,6 @@ language("c++") , "target.frameworks" , "target.exceptions" , "target.encodings" - , "target.pcxxheader" , "target.forceincludes" , "toolchain.includedirs" , "toolchain.defines" diff --git a/xmake/languages/c/xmake.lua b/xmake/languages/c/xmake.lua index 4e1a0041b00..a9f7418ebfd 100644 --- a/xmake/languages/c/xmake.lua +++ b/xmake/languages/c/xmake.lua @@ -42,6 +42,7 @@ language("c") , "target.vectorexts:check" , "target.languages" , "target.runtimes" + , "target.pcheader" , "target.includedirs" , "target.defines" , "target.undefines" @@ -49,7 +50,6 @@ language("c") , "target.frameworks" , "target.exceptions" , "target.encodings" - , "target.pcheader" , "target.forceincludes" , "toolchain.includedirs" , "toolchain.defines" diff --git a/xmake/languages/objc++/xmake.lua b/xmake/languages/objc++/xmake.lua index e1cb6ffa569..4c3b6ea14a1 100644 --- a/xmake/languages/objc++/xmake.lua +++ b/xmake/languages/objc++/xmake.lua @@ -61,6 +61,8 @@ language("objc++") , "target.optimize:check" , "target.vectorexts:check" , "target.languages" + , "target.pmheader" + , "target.pmxxheader" , "target.includedirs" , "target.defines" , "target.undefines" @@ -68,8 +70,6 @@ language("objc++") , "target.frameworks" , "target.exceptions" , "target.encodings" - , "target.pmheader" - , "target.pmxxheader" , "target.forceincludes" , "toolchain.includedirs" , "toolchain.defines" diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 2ff5be449d9..821bd99101d 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