Mercurial > vim-unreal
comparison compiler/ubuild.vim @ 2:9235d8341a18
Refactor the build system invocation commands.
Now we have proper knowledge of the projects inside a codebase ("branch"). The
plugin should correctly parse configuration names, find the correct module to
build based on the configuration, and so on.
Also, added support for generating the clang compilation database.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 22 Jan 2021 16:38:18 -0800 |
parents | ba03cac1b1c6 |
children |
comparison
equal
deleted
inserted
replaced
1:43d0e448edce | 2:9235d8341a18 |
---|---|
7 endif | 7 endif |
8 let current_compiler = "ubuild" | 8 let current_compiler = "ubuild" |
9 | 9 |
10 let s:keepcpo = &cpo | 10 let s:keepcpo = &cpo |
11 | 11 |
12 let s:prgpath = unreal#get_script_path("Engine/Build/BatchFiles/Build") | 12 let s:scriptname = get(g:, '__unreal_makeprg_script', 'Build') |
13 let s:prgargs = get(g:, "unreal_temp_makeprg_args__", "") | 13 let s:prgpath = shellescape( |
14 if !empty(s:prgargs) | 14 \unreal#get_script_path("Engine/Build/BatchFiles/".s:scriptname)) |
15 let s:prgargs = '\ '.join(s:prgargs, '\ ') | 15 let s:prgargs = map( |
16 \copy(get(g:, '__unreal_makeprg_args', [])), | |
17 \{idx, val -> escape(val, ' \"')}) | |
18 let s:prgcmdline = fnameescape(s:prgpath).'\ '.join(s:prgargs, '\ ') | |
19 | |
20 call unreal#trace("Setting makeprg to: ".s:prgcmdline) | |
21 | |
22 if !get(g:, 'unreal_debug_build', 0) | |
23 execute "CompilerSet makeprg=".s:prgcmdline | |
24 else | |
25 execute "CompilerSet makeprg=echo\\ ".shellescape(s:prgcmdline) | |
16 endif | 26 endif |
17 call unreal#trace("Setting makeprg to: ".s:prgpath.s:prgargs) | |
18 execute "CompilerSet makeprg=".fnameescape(s:prgpath).s:prgargs | |
19 | 27 |
20 CompilerSet errorformat& | 28 CompilerSet errorformat& |
29 | |
30 " Set the MSBuild error format on Windows. | |
31 "if has('win32') || has('win64') | |
32 " execute "CompilerSet errorformat=".vimcrosoft#get_msbuild_errorformat() | |
33 " echom "Set errorformat from vimcrosoft!" | |
34 " echom &errorformat | |
35 "else | |
36 " echom "Not setting error format" | |
37 "endif | |
21 | 38 |
22 let &cpo = s:keepcpo | 39 let &cpo = s:keepcpo |
23 unlet s:keepcpo | 40 unlet s:keepcpo |
24 | 41 |