summaryrefslogtreecommitdiff
path: root/xmake/modules/private/tools/cl/parse_include.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-03-12 10:15:16 +0800
committerruki <[email protected]>2023-03-12 10:15:16 +0800
commitf6059fbf557f785dc4dfde88ecb7fc3c0128b1a6 (patch)
tree2c17dcfbe3864d28ea943a5d4e69df3a677536d7 /xmake/modules/private/tools/cl/parse_include.lua
parentf4609ef1afd0f24d6123ecf649b23edc6043a878 (diff)
improve note include for ninja generator
Diffstat (limited to 'xmake/modules/private/tools/cl/parse_include.lua')
-rw-r--r--xmake/modules/private/tools/cl/parse_include.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/private/tools/cl/parse_include.lua b/xmake/modules/private/tools/cl/parse_include.lua
index afb43b056..700f9823f 100644
--- a/xmake/modules/private/tools/cl/parse_include.lua
+++ b/xmake/modules/private/tools/cl/parse_include.lua
@@ -27,7 +27,7 @@ import("lib.detect.find_tool")
import("private.tools.vstool")
-- probe include note prefix from cl
-function _probe_include_note_from_cl()
+function probe_include_note_from_cl()
local key = "cldeps.parse_include.note"
local note = detectcache:get(key)
if not note then
@@ -69,11 +69,11 @@ end
--
-- @note we cannot get better solution to distinguish between `includes` and `error infos`
--
-function _get_include_notes()
+function get_include_notes()
local notes = _g.notes
if not notes then
notes = {}
- local note = _probe_include_note_from_cl()
+ local note = probe_include_note_from_cl()
if note then
table.insert(notes, note)
end
@@ -90,7 +90,7 @@ end
-- main entry
function main(line)
- local notes = _get_include_notes()
+ local notes = get_include_notes()
for idx, note in ipairs(notes) do
if line:startswith(note) then
-- optimization: move this note to head