diff options
| author | ruki <[email protected]> | 2025-10-02 19:09:25 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-02 19:09:25 +0800 |
| commit | c62972f4def074c8b0b433e557a48d313bf77a18 (patch) | |
| tree | 0a24c95b7e5f3b2c0b73c3a8857b77dee04842ea /xmake/plugins | |
| parent | 553eceaccbddb35e8499b3a4332a5b798219f796 (diff) | |
| parent | 6377f4494967e341150f0e2bb042d3c7d8bd15c9 (diff) | |
Merge pull request #6872 from xmake-io/opti
Improve hash
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index a5ec312cb..a339a654e 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -1074,7 +1074,7 @@ function _add_target_link_libraries(cmakelists, target, outputdir) local has_links = #target:objectfiles() > objectfiles_set:size() - local key = target:name() .. "_" .. hash.uuid():split("-", {plain = true})[1] + local key = target:name() .. "_" .. hash.rand32() if has_links then cmakelists:print("add_library(target_objectfiles_%s OBJECT IMPORTED GLOBAL)", key) cmakelists:print("set_property(TARGET target_objectfiles_%s PROPERTY IMPORTED_OBJECTS", key) @@ -1244,7 +1244,7 @@ function _add_target_custom_commands_for_batchcmds(cmakelists, target, outputdir -- -- @see https://gitlab.kitware.com/cmake/cmake/-/issues/17802 -- - local key = target:name() .. "_" .. hash.uuid():split("-", {plain = true})[1] + local key = target:name() .. "_" .. hash.rand32() cmakelists:print("add_custom_command(OUTPUT output_%s", key) for _, cmd in ipairs(cmds) do local command = _get_command_string(cmd, outputdir) |
