title: Embed a string of compiler options in an executable (Visual Studio)
body: <p>Using gcc and Makefiles, I am able to embed some compiler options into a string for an executable to access as follows:</p>
  
  <p>Makefile:</p>
  
  <pre><code>CXX=/usr/bin/g++
  CXXFLAGS=-ansi -Wall -c
  CXXDEFINES='-DCXXCOMMAND="$(CXX) $(CXXFLAGS)"'
  </code></pre>
  
  <p>C++ file:  </p>
  
  <pre><code>#ifdef CXXCOMMAND
      std::cout &lt;&lt; "C++ Command: " &lt;&lt; CXXCOMMAND &lt;&lt; std::endl;
  #endif
  </code></pre>
  
  <p>And then I am able to print it to the console from the executable.</p>
  
  <p>Is it possible to do this in Visual Studio? Specifically I am looking to put in the optimization flags <em>(/O2, /Od, etc...)</em>, but the more I have access to, the better things will work for me.</p>
  
  <p><em>Microsoft Visual Studio Professional 2012</em><br>
  <em>Intel C++ Composer XE 2013 SP1</em></p>