title: Cmake: How to have add_custom_command() run after all project files are built
body: <p>Using Cmake v3.8, I need my custom command to run only after my newly built .hex, .map, and .elf files are produced. However, the command is not truly running after all of the *.hex, *.map, and *.elf files are produced. Here is what I have:</p>
  
  <pre><code>    add_custom_command(
      POST_BUILD
      COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/performCrc32.py
      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
      OUTPUT  performCrc32.out
      COMMENT "Running CRC32 check..."
  )
  add_custom_target(
      performCrc32 ALL
      DEPENDS performCrc32.py
      performCrc32.out
  ) 
  </code></pre>
  
  <p>What am I missing, if anything?</p>