Skip to content

Commit

Permalink
add build_toolchain_file configuration (#27)
Browse files Browse the repository at this point in the history
The BUILD_TOOLCHAIN_FILE is an option that is helpful on windows when
using vcpkg
  • Loading branch information
glhewett committed Dec 24, 2020
1 parent c3823d9 commit 4b7ff85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -36,6 +36,8 @@ result of the cmake command in the quickfix as well.

* `g:cmake_build_shared_libs` same as `-DBUILD_SHARED_LIBS`

* `g:cmake_toolchain_file` same as `-DCMAKE_TOOLCHAIN_FILE`

* `g:cmake_project_generator` same as `-G`. Changes will have no effect until you run :CMakeClean and then :CMake.

* `g:cmake_export_compile_commands` same as `-DCMAKE_EXPORT_COMPILE_COMMANDS`.
Expand Down
2 changes: 2 additions & 0 deletions doc/cmake.txt
Expand Up @@ -42,6 +42,8 @@ g:cmake_c_compiler same as -DCMAKE_C_COMPILER, however, this will

g:cmake_build_shared_libs same as -DBUILD_SHARED_LIBS

g:cmake_toolchain_file same as -DCMAKE_TOOLCHAIN_FILE

g:cmake_build_dir set the cmake 'build' directory, default: 'build'

g:cmake_project_generator set project generator, however, this will have
Expand Down
3 changes: 3 additions & 0 deletions plugin/cmake.vim
Expand Up @@ -102,6 +102,9 @@ function! s:cmake_configure(cmake_vim_command_args)
if exists("g:cmake_build_shared_libs")
let l:argument += [ "-DBUILD_SHARED_LIBS:BOOL=" . g:cmake_build_shared_libs ]
endif
if exists("g:cmake_toolchain_file")
let l:argument += [ "-DCMAKE_TOOLCHAIN_FILE:FILEPATH=" . g:cmake_toolchain_file ]
endif
if g:cmake_export_compile_commands
let l:argument += [ "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ]
endif
Expand Down

0 comments on commit 4b7ff85

Please sign in to comment.