Mercurial > vim-unreal
annotate compiler/uscriptwrapper.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 | |
children |
rev | line source |
---|---|
2
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 " Compiler file that runs vim-unreal's script wapper |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 " Compiler: Vim-unreal script wrapper |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 " Maintainer: Ludovic Chabant <https://ludovic.chabant.com> |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
4 |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
5 if exists("current_compiler") |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
6 finish |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
7 endif |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
8 let current_compiler = "uscriptwrapper" |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
10 let s:keepcpo = &cpo |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
11 |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
12 let s:prgpath = shellescape(unreal#get_vim_script_path("ScriptWrapper")) |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
13 let s:prgargs = get(g:, '__unreal_makeprg_args', '') |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
14 let s:prgcmdline = escape(s:prgpath.' '.s:prgargs, ' \"') |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
15 call unreal#trace("Setting makeprg to: ".s:prgcmdline) |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
16 execute "CompilerSet makeprg=".s:prgcmdline |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
17 |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
18 CompilerSet errorformat& |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
19 |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
20 let &cpo = s:keepcpo |
9235d8341a18
Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
21 unlet s:keepcpo |