• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1" Local vim rc
2
3if exists('g:build_dir')
4  finish
5endif
6
7let g:build_type = get(g:, 'build_type', 'Debug')
8let g:build_tests = get(g:, 'build_tests', 'ON')
9let g:cc = get(g:, 'cc', 'clang')
10let g:cxx = get(g:, 'cxx', 'clang++')
11
12let g:root_dir = g:localvimrc_script_dir_unresolved
13let $ROOT_DIR = g:root_dir
14let $UNCRUSTIFY_CONFIG = g:root_dir.'/uncrustify.cfg'
15
16let g:build_dir = g:root_dir.'/build'
17let &g:makeprg = 'cd '.g:build_dir.' && make -j1'
18
19packadd termdebug
20let g:termdebug_wide=1
21
22nnoremap <leader>c :call asyncrun#run('',
23        \ {'mode':'terminal','cwd':g:build_dir,'save':2},
24        \ 'cmake .. -DCMAKE_BUILD_TYPE='.g:build_type.' -DBUILD_TESTS='.g:build_tests
25        \ .' -DCMAKE_CXX_COMPILER='.g:cxx.' -DCMAKE_C_COMPILER='.g:cc
26        \ .' -DCMAKE_EXPORT_COMPILE_COMMANDS=ON'
27        \ .' -DBUILD_JNI_BINDING=ON'
28        \ .' -DBUILD_NODEJS_BINDING=ON'
29        \ .' -DBUILD_DART_BINDING=OFF')
30        \<CR>
31