1

I am trying to maintain an ARM command line (makefile) project using the MSVS 2013 Express IDE, to take advantage of the IDE's advanced code analysis capabilities.

The project consists of dozens of directories, each including a "src" and an "include" directories. In order for Intellisense to "understand" the various tokens, I need to add all those "include" directories to the Additional Include Directories search path.

Is there a way to recursively add all folders of a project's filesystem to the path?

ysap
  • 7,723
  • 7
  • 59
  • 122
  • Do you just want this for IntelliSense or for building too? If you just want IntelliSense support, you can add a `` item to your project. – James McNellis Jun 26 '15 at 01:52
  • @JamesMcNellis - thanks. MSVC won't build for ARM so for now, IntelliSense is the goal. Your suggestion makes sense with one limitation - if the directory structure is not uniform then I need to add a specific path template for every include directory depth. Why don't you make this an answer? Why leave as a comment? – ysap Jun 26 '15 at 10:53
  • I wasn't sure that this was what you were looking for. I've added an answer. – James McNellis Jun 26 '15 at 21:22

1 Answers1

2

If all you want is decent IntelliSense support and don't actually need the projects to build, then you can add the directories to your project as <ClInclude/> items that contain wildcards, e.g.

<ClInclude Include="path\to\root\*\include\*.h" />

You can add as many of these as you'd like and match whatever patterns you need using *. You'll need to add these to the project file manually (using a text editor); the IDE doesn't fully support items that contain wildcards.

James McNellis
  • 348,265
  • 75
  • 913
  • 977
  • Thanks. I actually added them to the `AdditionalIncludeDirectories` section and it works. What is the difference between the two sections? – ysap Jun 26 '15 at 22:51
  • I see that the `AdditionalIncludeDirectories` is per-configuration and is really meant for directories (and for the build process itself), while `ClInclude` has a list of the *header files* themselves. There must be a place in the IDE project options to enter a global include file, but I can't find it although I remember using that option in the past. – ysap Jun 26 '15 at 22:56