summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-08-04 10:41:45 +0800
committerruki <[email protected]>2017-08-04 10:41:45 +0800
commitb9f40db69152c3458b2a0dcd1b99eb094e578a0d (patch)
treee81ce87544c135b838d3c8f23ba79288993cc847 /xmake/core/project/target.lua
parent9e1b8493ee65cd59d524c95fd2e7f6af8265e60e (diff)
support .inl pch header
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index d6d2ee0a8..54bc7b62d 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -726,7 +726,7 @@ function target:configheader(outputdir)
return configheader, outputheader
end
--- get the precompiled source file (.[h|hpp], .[c|cpp])
+-- get the precompiled source file (.[h|hpp|inl], .[c|cpp])
function target:pcsourcefile()
-- get it from the cache first
@@ -739,7 +739,7 @@ function target:pcsourcefile()
local sourcefile = nil
for _, file in ipairs(table.wrap(self:get("precompiled_header"))) do
local extension = path.extension(file)
- if not headerfile and extension:startswith(".h") then
+ if not headerfile and (extension:startswith(".h") or extension == ".inl") then
headerfile = file
else
sourcefile = file
@@ -769,7 +769,7 @@ function target:pcheaderfile()
end
-- init sourcekinds
- local sourcekinds = {[".h"] = "cc", [".hpp"] = "cxx"}
+ local sourcekinds = {[".h"] = "cc", [".hpp"] = "cxx", [".inl"] = "cxx"}
-- get source kind
local sourcekind = sourcekinds[path.extension(precompiled_header)] or "cc"