diff options
| author | ruki <[email protected]> | 2023-03-12 10:15:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-12 10:15:16 +0800 |
| commit | f6059fbf557f785dc4dfde88ecb7fc3c0128b1a6 (patch) | |
| tree | 2c17dcfbe3864d28ea943a5d4e69df3a677536d7 /xmake/plugins/project | |
| parent | f4609ef1afd0f24d6123ecf649b23edc6043a878 (diff) | |
improve note include for ninja generator
Diffstat (limited to 'xmake/plugins/project')
| -rw-r--r-- | xmake/plugins/project/ninja/build_ninja.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/plugins/project/ninja/build_ninja.lua b/xmake/plugins/project/ninja/build_ninja.lua index 5fce32b9a..a360d198d 100644 --- a/xmake/plugins/project/ninja/build_ninja.lua +++ b/xmake/plugins/project/ninja/build_ninja.lua @@ -27,6 +27,7 @@ import("core.tool.linker") import("core.tool.compiler") import("lib.detect.find_tool") import("lib.detect.find_toolname") +import("private.tools.cl.parse_include") -- this sourcebatch is built? function _sourcebatch_is_built(sourcebatch) @@ -174,7 +175,12 @@ end function _add_rules_for_compiler(ninjafile) ninjafile:print("# rules for compiler") if is_plat("windows") then - ninjafile:print("msvc_deps_prefix = Note: including file:") + -- @see https://github.com/ninja-build/ninja/issues/613 + local note_include = parse_include.probe_include_note_from_cl() + if not note_include then + note_include = "Note: including file:" + end + ninjafile:print("msvc_deps_prefix = %s", note_include:trim()) end local add_compiler_rules = { |
