maddouri / vscode-cmake-tools-helper

VSCode extension that enables cpptools to automatically know the information parsed by CMake Tools (e.g. include directories and defines)
https://marketplace.visualstudio.com/items?itemName=maddouri.cmake-tools-helper
BSD 3-Clause "New" or "Revised" License
16 stars 6 forks source link

Empty includes and defines #8

Open Yanpas opened 7 years ago

Yanpas commented 7 years ago

Cmake 3.8.2 Ubuntu 16.04

c_cpp_properties json looks like

"name": "null",
"includePath": [],
"defines": [],

while .cmaketools.json contains all include paths:

My project consists of main CMakeLists file and includes many other CMakeLists with some other targets.

Yanpas commented 7 years ago

It even removed system includes: /usr/include/ etc.

JulZimmermann commented 7 years ago

Duplicate of https://github.com/maddouri/vscode-cmake-tools-helper/issues/4?

Yanpas commented 7 years ago

This bug contains bug #4. In my case include paths are absolutely empty, there are no system paths and cmake ones

gabyx commented 6 years ago

try to select not the target all. It depends on your project I think, but for me the all target does not produce anything too...

a-teammate commented 6 years ago

@gabyx advice works for me, except that it does not find system includes..

I have to execute gcc -v -E -x c++ - to get those and afterwards put them in manually. Afterwards it works like a charm :)

barsan-md commented 6 years ago

This bug affects me too. It doesn't work when I change the target.