You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using cmake-ide in a c++11 project and flycheck is giving me lots of errors. I run flycheck-compile with c/c++-clang and I was able to see that the argument -std=c++11 was missing. I copied the exact line and executed from the console passing this parameter and it reported no errors. I review a little the code of cmake-ide and I found that the only parameters that are captured are the includes -I, -include, -isystem and the definitions -D. I think that there are lots of other parameters that are importan to pass to the compiler such us: -std, the -f* and the -W*.
The text was updated successfully, but these errors were encountered:
I fould that in order to flycheck pass that argument to clang it is necessary to put in the variable flycheck-clang-language-standard the value c++11. I think cmake-ide should do that for us.
It does, in a way. Since there's no way to know what flags users need in totality, and the fact that system headers are in different locations, all flags you want to include should be specified in cmake-ide-flags-c++ and cmake-ide-flags-c variables. For instance, I personally use -std=c++1y instead of c++11, how would cmake-ide know which one to use?
Here's what I have in my own init.el:
The c++-include-paths function calls gcc -v -xc++ /dev/null -fsyntax-only and massages the result in elisp. Those -I flags must be set in the aforementioned cmake-ide variables for autocompletion to work correctly. It's explained in the README under "Usage".
I am using cmake-ide in a c++11 project and flycheck is giving me lots of errors. I run
flycheck-compile
withc/c++-clang
and I was able to see that the argument-std=c++11
was missing. I copied the exact line and executed from the console passing this parameter and it reported no errors. I review a little the code of cmake-ide and I found that the only parameters that are captured are the includes-I
,-include
,-isystem
and the definitions-D
. I think that there are lots of other parameters that are importan to pass to the compiler such us:-std
, the-f*
and the-W*
.The text was updated successfully, but these errors were encountered: