Skip to content

Commit

Permalink
append build_options last so backend args pass correctly (#263)
Browse files Browse the repository at this point in the history
append the `build_options` args last so that passing `"--", "<some backend arg>"` works correctly
  • Loading branch information
Ryex authored Nov 10, 2024
1 parent e0658e7 commit 15a095c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/cmake-tools/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,6 @@ function cmake.build(opt, callback)
}
end

vim.list_extend(args, config:build_options())

if opt.target ~= nil then
vim.list_extend(args, { "--target", opt.target })
vim.list_extend(args, fargs)
Expand All @@ -366,6 +364,8 @@ function cmake.build(opt, callback)
vim.list_extend(args, fargs)
end

vim.list_extend(args, config:build_options())

local env = environment.get_build_environment(config)
local cmd = const.cmake_command
return utils.execute(cmd, config.env_script, env, args, config.cwd, config.executor, callback)
Expand Down

0 comments on commit 15a095c

Please sign in to comment.