-
Notifications
You must be signed in to change notification settings - Fork 92
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
Doesn't properly parse defines with quotes #177
Comments
The issue is fixed if you change |
Thanks for the detailed report, I'll look into it. |
After looking at this and trying to understand why the current implementation is as it is, it's because the command string in the compilation database has to be split into a list of arguments, because, unfortunately, that's what flycheck requires. Normally, splitting on space is ok, but... as #142 shows, sometimes there's a file name with spaces in it e.g. {
"command": "g++ something \"foo - bar\" darkside"
} (Notice the escaped quotes around the name added by CMake) Trying to split the command string with But... that fails in your case because the quotes are explicit, and not because there were spaces inside. So now I need to write an elisp function that splits on spaces, except if one of the atoms is a quoted string with spaces inside, and only unquote if there are spaces. Neither |
Im also suffering from this issue. Simple |
When trying to create a compiler definition called VERSION set to the string "1.0.0" (with the quotes), cmake-ide doesn't seem to parse it correctly. Here's an example that compiles fine, but gets flycheck errors constantly when trying to edit it in emacs:
CMakeLists.txt
test.cpp
I get this for flycheck-clang-definitions:
And running flycheck-compile gives me:
The text was updated successfully, but these errors were encountered: