Reputation: 8165
Documentation at https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference is a bit fragmented. Can I use both path
and path/**
for recursive search and path/*
for non-recursive search in includePath
property?
Upvotes: 0
Views: 1428
Reputation: 15
For recursive search in includePath
property, path/**
should be used.
Form the linked documentation (emphasis mine)
includePath
An include path is a folder that contains header files (such as#include "myHeaderFile.h"
) that are included in a source file. Specify a list of paths for the IntelliSense engine to use while searching for included header files. Searching on these paths is not recursive. Specify**
to indicate recursive search. For example,${workspaceFolder}/**
will search through all subdirectories while${workspaceFolder}
will not. If on Windows with Visual Studio installed, or if a compiler is specified in thecompilerPath
setting, it is not necessary to list the system include paths in this list.
Upvotes: 0
Reputation: 13060
Form the linked documentation (emphasis mine)
path
A list of paths for the Tag Parser to search for headers included by your source files. If omitted,includePath
will be used as thepath
. Searching on these paths is recursive by default. Specify*
to indicate non-recursive search. For example:/usr/include
will search through all subdirectories while/usr/include/*
will not.
And from the entry on includePath, since it is used if path is omitted (again, emphasis mine)
includePath
An include path is a folder that contains header files (such as#include "myHeaderFile.h"
) that are included in a source file. Specify a list of paths for the IntelliSense engine to use while searching for included header files. If a path ends with/**
the IntelliSense engine will do a recursive search for header files starting from that directory. If on Windows with Visual Studio installed, or if a compiler is specified in thecompilerPath
setting, it is not necessary to list the system include paths in this list.
Yes, use either path
or path/**
Upvotes: 1