-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fields from .cmake-kits.json
get ignored?
#195
Comments
Hi!👋 |
The As for the The way I use it is:
These are just some of my build variants: let g:cmake_variants =
\{
\ 'debug-with-warnings': {
\ 'cmake_build_type' : 'Debug',
\ 'cmake_usr_args' : '-DENABLE_RUNTIME_CHECKS=ON -DMB_TREAT_WARNINGS_AS_ERRORS=OFF'
\ },
\ 'debug': {
\ 'cmake_build_type' : 'Debug',
\ 'cmake_usr_args' : '-DENABLE_RUNTIME_CHECKS=ON -DMB_TREAT_WARNINGS_AS_ERRORS=ON'
\ },
\ 'release': {
\ 'cmake_build_type' : 'Release',
\ 'cmake_usr_args' : '-DENABLE_RUNTIME_CHECKS=OFF -DMB_TREAT_WARNINGS_AS_ERRORS=OFF -DMB_INTEL_OPTIMIZATION=haswell'
\ }} And these are some of my ...
"clang": {
"compilers": {
"C" : "/usr/bin/clang",
"CXX" : "/usr/bin/clang++"
},
"query_driver" : "/usr/bin/clang++",
"generator": "Ninja"
},
"gcc": {
"compilers": {
"C" : "/usr/bin/gcc",
"CXX" : "/usr/bin/g++"
},
"query_driver" : "/usr/bin/g++",
"generator": "Ninja"
},
... As for the let g:cmake_build_path_pattern = [ '%s/workspace/build/%s/%s/%s', "$HOME, fnamemodify( getcwd(), ':t' ), g:cmake_selected_kit, g:cmake_build_type" ] That way I get builds like:
|
Hi @mark2185 I see, I didn't know that the The
Unfortunately, this still doesn't work. When I open the a file in the test folder, it evaluates the above expression to e.g. I'm sorry, I assume this is my inexperience with nvim that is causing this... |
That's actually why both of the elements in I'd suggest either writing that variable definition like this: vim.cmd([[
let g:cmake_build_path_pattern = [ '%s/iilak/prg/build_folders/%s/%s/%s', "$HOME, fnamemodify( getcwd(), ':t' ), g:cmake_selected_kit, g:cmake_build_type" ]
]]) Or you could try writing it in lua, but as two strings, so just Since the plugin is written in |
Hi @mark2185 Your Lua suggestion worked like a charm. Thanks a lot for the support! I'll close the issue, hope that works for you 🙌 |
Great! Glad to have helped! :) |
Describe the bug
I'm having trouble with the
.cmake-kits.json
configuration. I have a project and in its root I created the.cmake-kits.json
file and I pasted the following configuration:The file gets correctly recognized by
nvim
, i.e. I can run:CMakeSelectKit gcc Debug
and then I run:CMake
. If I then run:CMakeInfo
, half of the settings from above have been ignored (build type, build dir, build args).To Reproduce
Steps to reproduce the behavior:
CMakeLists.txt
,main.cpp
, and.cmake-kits.json
with the above contentCMakeLists.txt
innvim
and run:CMakeSelectKit gcc Debug
and:CMake
:CMakeInfo
. You should now see thisAs you can see, anything related to the build config is not working.
Expected behavior
A configuration that corresponds to the specified
.cmake-kits.json
.If I'm misunderstanding how the
.cmake-kits.json
should work, I apologize for the bug report and would appreciate some guidance on how to get it working.^^Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: