title: CMake generator expression, differentiate C / C++ code
body: <p>I would like to add <code>-std=c++11</code> to my </p>
  
  <pre><code>add_compile_options("-std=c++11")
  </code></pre>
  
  <p>However, this also adds them to compilation of <em>C</em> files, not only <em>C++</em>. I know I can add conditional compile flags depending on the configuration used:</p>
  
  <pre><code>add_compile_options("$&lt;$&lt;CONFIG:DEBUG&gt;:-addMeInDebugOnly&gt;")
  </code></pre>
  
  <p>How can I add my flag only to c++ files? I'm looking for something like:</p>
  
  <pre><code>add_compile_options("$&lt;$&lt;??:??&gt;:-std=c++11&gt;")
  </code></pre>
  
  <p>But what do I need to fill in with the question marks?</p>