title: target_compile_options() for only C++ files?
body: <p>Is it possible to use <code>target_compile_options()</code> for only C++ files? I'd like to use it for a target that is uses as a dependency for other applications so that the library can propagate its compiler flags to those apps. However, there are certain flags, such as <code>-std=c++14</code>, that cause the build to fail if they are used with C or ObjC files.</p>
  
  <p>I've read that I should <code>CXX_FLAGS</code> instead to only add those flags to C++ files, however this won't (automatically) propagate through cmake's packages system.</p>