title: Is there a way to add include directory from C++ code?
body: <p>I have a project whose vcxproj file is auto generated prior of compilation by using a script during the build process.</p>
  
  <p>this project dependes on a boost library which is installed in a known location on the build machine.</p>
  
  <p>the project header file declares:</p>
  
  <pre><code>#include "boost/foreach.hpp"
  </code></pre>
  
  <p>which forces me to manually add the path to the <code>boost</code> root folder to the <code>Additional Include Directories</code> field in the vcxproj file.</p>
  
  <p>As the project file is auto-generated it forces me to split the build process into two stages and edit the project file in between.</p>
  
  <p>i have also tried to change the source file and add the full path in the <code>#include</code> statement:</p>
  
  <pre><code>#include "&lt;path to boost root&gt;/boost/foreach.hpp"
  </code></pre>
  
  <p>but then some <code>boost</code> internal include fails. Which means i can't proceed in this way.</p>
  
  <p>I have read through <a href="https://stackoverflow.com/questions/1828746/set-include-directory-from-c-code-file">Set #include directory from C++ code file</a> to find there is no option to add the path from code.</p>
  
  <p>As I'm now on VS2012/C++11 environment i wonder if anything changed in VS2012 / C++11? </p>
  
  <p>Is it still impossible to add an Include directory using a code statement?</p>