diff options
| author | ruki <[email protected]> | 2018-05-09 23:14:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-05-09 13:28:06 +0800 |
| commit | 2031b518b0d8cec7e9fc8f43f2a3a1f23d8cc1f8 (patch) | |
| tree | 8107464ed87023b785e25c19ba4526256baf4c99 | |
| parent | e9ad26b3a332b296ab02177f5d3b17a108a6ee08 (diff) | |
fix name conflict for scanner
| -rw-r--r-- | xmake/actions/config/scanner.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/actions/config/scanner.lua b/xmake/actions/config/scanner.lua index 2af0d40eb..a9eb87a9e 100644 --- a/xmake/actions/config/scanner.lua +++ b/xmake/actions/config/scanner.lua @@ -120,12 +120,16 @@ function make() for _, sourcefile in ipairs(sourcefiles_main) do -- trace - cprint("target(${magenta}%s${clear}): binary", path.basename(sourcefile)) + local name = path.basename(sourcefile) + if name == targetname then + name = name .. "1" + end + cprint("target(${magenta}%s${clear}): binary", name) cprint(" ${green}[+]: ${clear}%s", sourcefile) -- add target file:print("-- define target") - file:print("target(\"%s\")", path.basename(sourcefile)) + file:print("target(\"%s\")", name) file:print("") file:print(" -- set kind") file:print(" set_kind(\"binary\")") |
