title: Cmake export compile commands for header files for Emacs
body: <p>What's the point of</p>
  <pre><code>cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
  </code></pre>
  <p>if it can only generate a compile_commands.json file for .cpp files and not for .h or .hpp files.</p>
  <p>I'm trying to use it in tandem with irony-mode on Emacs but if I can't have code completion based on compile_commands.json for headers I think that .clang_complete is a much better option. There are a lot of C++ stuff that is header only!</p>
  <p>Is there a way to get cmake generating compile_commands.json for headers and sources?</p>
  <p>Thanks!</p>