Files
nvim/lua/overseer/template/user/cmake/build.lua

24 lines
512 B
Lua

return {
name = 'CMake Build for nvim',
builder = function()
return {
cmd = { 'cmake' },
args = { '--build', '.',
'--', '-j8' },
cwd = 'build_nvim',
}
end,
condition = {
callback = function(opts)
if vim.fn.executable("cmake") == 0 then
return false, 'Command "cmake" not found'
end
if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then
return false, "No CMakeLists.txt found"
end
return true
end,
},
}