-
Notifications
You must be signed in to change notification settings - Fork 6
retain c_cpp_properties.json information #4
Comments
Yes, also the intellisense engine parser mode always gets overriden with "msvc-x64" and I could not yet find a way to change that default value. |
Oh also it would be great because then I could configure ignore-paths - we have a post build step which copies the results into a result folder, ending up with multiple copies of a file in the implicitly-recursive default-include paths. |
Hello! Sorry for the delay. (got taken away by real life stuff ;) The problem with standard paths is that they are both OS- and compiler-dependent. Currently, I can think of at least 3 approaches:
What do you guys think of that? |
Hi! Btw. do you happen to know what triggers cmake-tools to fall back to the "all" target? That happens quite often to me and obviously I'm losing all the include paths with that... |
I think the best candidate for this template-config would still be the Because cpptools somehow already takes over the part of automatic standard includes, you would also not need to figure out to support all the different standard includes for the different compilers. These are just some ideas, but I think your approach 3. also sound like something that would only need to be done once and then can be reused for new projects. |
Same problem on macOS. Couldn't it just use clang to pull in the locations? For example: clang -Wp,-v -E -xc -x c++ /dev/nullwill yield: /usr/local/include |
I also ran into this problem. On Ubuntu 17.04 I had to add the following paths to get rid of all unknown includes
The first path is for stddef.h and the other ones are obviously for C++ includes - the version number is the one from the GCC being used. I assume when libc++ and/or clang are used they might differ. |
Ideas:
|
As a workaround, I have added my sdtlib paths to For example, if I wanted |
Hi,
it's great that you had the idea to make this tool, because it indeed is annoying to manually add all the paths by hand while CMakeTools already provides most of the parts.
My problem is: Standard paths like
/usr/include
/usr/local/include
or a little bit more exotic (depending on which distro (mine Linux Mint 17.3, based on Ubuntu 14.04 LTS))/usr/include/x86_64-linux-gnu/c++/5
<-- this is the c++ standard library I am usingare not included in my project so that simple things like using
#include <vector>
fail for the intellisense engine.It would be great, if you could first use the output generated by VS Code in the
c_cpp_properties.json
and then extend it by the information from CMakeTools.The text was updated successfully, but these errors were encountered: