diff options
| author | ruki <[email protected]> | 2017-08-04 10:41:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-08-04 10:41:45 +0800 |
| commit | b9f40db69152c3458b2a0dcd1b99eb094e578a0d (patch) | |
| tree | e81ce87544c135b838d3c8f23ba79288993cc847 /xmake/modules | |
| parent | 9e1b8493ee65cd59d524c95fd2e7f6af8265e60e (diff) | |
support .inl pch header
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 39d14e350..d02982d12 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -235,7 +235,7 @@ function nf_precompiled_header(self, headerfile, target) -- make flag local extension = path.extension(headerfile) - if extension == ".h" or extension == ".hpp" then + if (extension:startswith(".h") or extension == ".inl") then return "-Yu" .. headerfile .. " -Fp" .. target:pcheaderfile() end end @@ -306,7 +306,7 @@ function _compargv1(self, sourcefile, objectfile, flags) -- precompiled header? local extension = path.extension(sourcefile) - if extension == ".h" or extension == ".hpp" then + if (extension:startswith(".h") or extension == ".inl") then return _compargv1_pch(self, sourcefile, objectfile, flags) end diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index d07201362..b8f34942f 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -253,7 +253,7 @@ end -- make the precompiled header flag function nf_precompiled_header(self, headerfile, target) local extension = path.extension(headerfile) - if extension == ".h" or extension == ".hpp" then + if (extension:startswith(".h") or extension == ".inl") then if self:name() == "clang" then return "-include " .. headerfile .. " -include-pch " .. target:pcheaderfile() else @@ -350,7 +350,7 @@ function _compargv1(self, sourcefile, objectfile, flags) -- precompiled header? local extension = path.extension(sourcefile) - if extension == ".h" or extension == ".hpp" then + if (extension:startswith(".h") or extension == ".inl") then return _compargv1_pch(self, sourcefile, objectfile, flags) end |
