diff options
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 7b0e81be0..069c96d86 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -283,7 +283,7 @@ end -- make the force include flag function nf_forceinclude(self, headerfile, target) - local sourcekinds = target:extraconf("forceincludes", headerfile, "sourcekinds") + local sourcekinds = target and target:extraconf("forceincludes", headerfile, "sourcekinds") if not sourcekinds or table.contains(table.wrap(sourcekinds), self:kind()) then return {"-FI", headerfile} end diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index bf52b8d29..84b0aca4a 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -280,7 +280,7 @@ end -- make the force include flag function nf_forceinclude(self, headerfile, target) - local sourcekinds = target:extraconf("forceincludes", headerfile, "sourcekinds") + local sourcekinds = target and target:extraconf("forceincludes", headerfile, "sourcekinds") if not sourcekinds or table.contains(table.wrap(sourcekinds), self:kind()) then return {"-include", headerfile} end |
