force write the cmake toolcahin file everytime just in case the content was changed during each build

This commit is contained in:
otavepto 2024-05-27 05:34:12 +03:00
parent d724169f3d
commit 5f96b4907c

View File

@ -203,7 +203,6 @@ local function cmake_build(dep_folder, is_32, extra_defs)
if string.match(_ACTION, 'gmake.*') then if string.match(_ACTION, 'gmake.*') then
if is_32 then if is_32 then
local toolchain_file = path.join(deps_dir, 'toolchain_32.cmake') local toolchain_file = path.join(deps_dir, 'toolchain_32.cmake')
if not os.isfile(toolchain_file) then
if not io.writefile(toolchain_file, [[ if not io.writefile(toolchain_file, [[
set(CMAKE_C_FLAGS_INIT "-m32") set(CMAKE_C_FLAGS_INIT "-m32")
set(CMAKE_CXX_FLAGS_INIT "-m32") set(CMAKE_CXX_FLAGS_INIT "-m32")
@ -211,7 +210,6 @@ local function cmake_build(dep_folder, is_32, extra_defs)
error("failed to create 32-bit cmake toolchain (gmake)") error("failed to create 32-bit cmake toolchain (gmake)")
return return
end end
end
cmd_gen = cmd_gen .. ' -DCMAKE_TOOLCHAIN_FILE="' .. toolchain_file .. '"' cmd_gen = cmd_gen .. ' -DCMAKE_TOOLCHAIN_FILE="' .. toolchain_file .. '"'
end end