diff options
| author | 24bit-xjkp <[email protected]> | 2026-01-04 21:59:52 +0800 |
|---|---|---|
| committer | 24bit-xjkp <[email protected]> | 2026-01-04 21:59:52 +0800 |
| commit | 8ff9ac175a2ee4e4a994b571e585f610c86de5c3 (patch) | |
| tree | be2deeac92d21abb0a048781ccc0fa97753dd6da | |
| parent | 241c234a48c1e7fef1ff5ff638e904843c27bc20 (diff) | |
fix(rule/verilator): Fix c++ language detect
| -rw-r--r-- | xmake/rules/verilator/verilator.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/xmake/rules/verilator/verilator.lua b/xmake/rules/verilator/verilator.lua index 8e8b2e297..4631c5886 100644 --- a/xmake/rules/verilator/verilator.lua +++ b/xmake/rules/verilator/verilator.lua @@ -124,10 +124,6 @@ function _get_lanuage_flags(target) end end ---- @brief get makefile type ---- @param verilator string verilator program path ---- @return boolean support_json Whether support json ---- @return string makefile_type Makefile type, json or cmake function _get_makefile_type(verilator) local tool = assert(find_tool("verilator", { program = verilator, version = true }), "verilator not found!") local version = tool.version @@ -233,7 +229,7 @@ endmodule]]) local languages = target:get("languages") local cxxlang = false for _, lang in ipairs(languages) do - if lang:startswith("cxx") or lang:startswith("c++") then + if lang:find("xx", 1, true) or lang:find("++", 1, true) then cxxlang = true break end |
