From 4ef482175337e64d7bf2fb33abec2917c9e4fd4d Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 1 Oct 2025 00:37:42 +0800 Subject: update some uuid hashes --- xmake/plugins/project/cmake/cmakelists.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/plugins') diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index a5ec312cb..ee6493cde 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.random32() 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.random32() cmakelists:print("add_custom_command(OUTPUT output_%s", key) for _, cmd in ipairs(cmds) do local command = _get_command_string(cmd, outputdir) -- cgit v1.3.1 From 21c498ab682b083a58dbe25a716ba72a5012f8be Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 1 Oct 2025 00:51:18 +0800 Subject: fix hash api --- xmake/plugins/project/cmake/cmakelists.lua | 4 ++-- xmake/rules/c++/unity_build/unity_build.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/plugins') diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index ee6493cde..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.random32() + 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.random32() + 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) diff --git a/xmake/rules/c++/unity_build/unity_build.lua b/xmake/rules/c++/unity_build/unity_build.lua index 1ced33ec8..3df2d75b4 100644 --- a/xmake/rules/c++/unity_build/unity_build.lua +++ b/xmake/rules/c++/unity_build/unity_build.lua @@ -36,7 +36,7 @@ function _merge_unityfile(target, sourcefile_unity, sourcefiles, opt) sourcefile_unity = path.absolute(sourcefile_unity) sourcefile = path.relative(sourcefile, path.directory(sourcefile_unity)) if uniqueid then - unityfile:print("#define %s %s", uniqueid, "unity_" .. hash.random32()) + unityfile:print("#define %s %s", uniqueid, "unity_" .. hash.rand32()) end unityfile:print("#include \"%s\"", sourcefile) if uniqueid then -- cgit v1.3.1