Skip to content

Commit 692dc06

Browse files
authored
Merge branch 'master' into changes-for-pullrequest
2 parents 5171f87 + 5a43ac6 commit 692dc06

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ and whenever one is found, it runs the cmake command there, assuming the CMakeLi
1616
file is just one directory above. Any arguments given to :CMake will be directly passed
1717
on to the cmake command. It also sets the working directory of the make command, so
1818
you can just use quickfix as with a normal Makefile project.
19+
If you have the [AsyncRun plugin](https://github.com/skywind3000/asyncrun.vim)
20+
installed, it will be used automatically and you will be able to check the
21+
result of the cmake command in the quickfix as well.
1922

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

doc/cmake.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ g:cmake_build_dir set the cmake 'build' directory, default: 'buil
4747
g:cmake_project_generator set project generator, however, this will have
4848
no effect until you run :CMakeClean and :CMake.
4949

50+
g:cmake_usr_args custom user arguments. Ex: 'let g:cmake_usr_args="-DDEBUG=YES"'
51+
5052
b:build_dir the path to the cmake build directory for the current buffer.
5153
This variable is set with the first :CMake or :CMakeFindBuildDir call.
5254
Once found, it will not be searched for again unless you call
@@ -62,3 +64,4 @@ g:cmake_export_compile_commands same as -DCMAKE_EXPORT_COMPILE_COMMANDS=ON, use
6264

6365
g:cmake_ycm_symlinks create a symlink to the compile_commands.json file in the
6466
root of the project (build/..) if the file is found.
67+

plugin/cmake.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ function! s:cmake_configure()
8484
if exists("g:cmake_c_compiler")
8585
let l:argument += [ "-DCMAKE_C_COMPILER:FILEPATH=" . g:cmake_c_compiler ]
8686
endif
87-
endif
87+
88+
if exists("g:cmake_usr_args")
89+
let l:argument+= [ g:cmake_usr_args ]
90+
endif
8891

8992
if exists("g:cmake_install_prefix")
9093
let l:argument += [ "-DCMAKE_INSTALL_PREFIX:FILEPATH=" . g:cmake_install_prefix ]

0 commit comments

Comments
 (0)