diff options
| author | ruki <[email protected]> | 2023-08-21 23:42:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-21 23:42:12 +0800 |
| commit | d528d56c990bf06f99dcff2412fb19d9b1730c4f (patch) | |
| tree | fdfa088e57da84c31e30c96c12522afe1c80acd4 /xmake/modules/core/tools/gcc.lua | |
| parent | e73df8b4713c4b8c928c77d0baa4185be1db6517 (diff) | |
add force includes #4101
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 60bfc8e5e..37f1f345a 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -278,6 +278,20 @@ function nf_sysincludedir(self, dir) return {"-isystem", path.translate(dir)} end +-- make the force c include flag +function nf_cinclude(self, headerfile) + if self:kind() == "cc" then + return {"-include", headerfile} + end +end + +-- make the force c++ include flag +function nf_cxxinclude(self, headerfile) + if self:kind() == "cxx" then + return {"-include", headerfile} + end +end + -- make the link flag function nf_link(self, lib) if lib:endswith(".a") or lib:endswith(".so") or lib:endswith(".dylib") or lib:endswith(".lib") then |
