Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ and whenever one is found, it runs the cmake command there, assuming the CMakeLi
file is just one directory above. Any arguments given to :CMake will be directly passed
on to the cmake command. It also sets the working directory of the make command, so
you can just use quickfix as with a normal Makefile project.
If you have the [AsyncRun plugin](https://github.com/skywind3000/asyncrun.vim)
installed, it will be used automatically and you will be able to check the
result of the cmake command in the quickfix as well.

* `:CMakeClean` deletes all files in the build directory. You can think of this as a CMake version of make clean.

Expand Down
10 changes: 8 additions & 2 deletions plugin/cmake.vim
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,14 @@ function! s:cmake(...)

let s:cmd = 'cmake '. l:argumentstr . " " . join(a:000) .' .. '
echo s:cmd
let s:res = system(s:cmd)
echo s:res
if exists(":AsyncRun")
execute 'copen'
execute 'AsyncRun ' . s:cmd
execute 'wincmd p'
else
let s:res = system(s:cmd)
echo s:res
endif

exec 'cd - '

Expand Down