title: CMake not generating compile_commands.json
body: <p>I'm new to CMake and I'm trying to create the compile_commands.json file to use with clang, but I'm having some difficulties generating the file and I'm not sure why. I've been able to use cmake to compile the binary <code>person</code> that I have below, but after that was successful I've been unable to get it to output the compile commands.</p>
  
  <p>I've also tried doing the -DCMAKE_EXPORT_COMPILE_COMMANDS=ON flag, but that didn't work either. So far there's been no errors, but also no output.</p>
  
  <p>Here's what my CMakeLists.txt file looks like:</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.6)
  project (Tutorial)
  set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  add_executable(person Person.cc Pirate.cc main.cc)
  </code></pre>