title: CMake: when to use add_definitions instead of set_target_properties(target PROPERTIES COMPILE_DEFINITIONS definitions)
body: <p>In CMake documentation, we can read:</p>
  
  <p><strong><a href="http://www.cmake.org/cmake/help/v2.8.10/cmake.html#command:add_definitions" rel="noreferrer">add_definitions</a></strong></p>
  
  <blockquote>
    <p>Adds flags to the compiler command line for sources in the current directory and below. </p>
  </blockquote>
  
  <p><strong><a href="http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_dir:COMPILE_DEFINITIONS" rel="noreferrer">COMPILE_DEFINITIONS property on directories</a></strong></p>
  
  <blockquote>
    <p>COMPILE_DEFINITIONS: Preprocessor definitions for compiling a directory's sources.</p>
  </blockquote>
  
  <p><strong><a href="http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:COMPILE_DEFINITIONS" rel="noreferrer">COMPILE_DEFINITIONS property on targets</a></strong></p>
  
  <blockquote>
    <p>COMPILE_DEFINITIONS: Preprocessor definitions for compiling a target's sources.</p>
  </blockquote>
  
  <p><strong><a href="http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_sf:COMPILE_DEFINITIONS" rel="noreferrer">COMPILE_DEFINITIONS property on source files</a></strong></p>
  
  <blockquote>
    <p>COMPILE_DEFINITIONS: Preprocessor definitions for compiling a source file.</p>
  </blockquote>
  
  <p><code>COMPILE_DEFINITIONS</code> and <code>add_definitions</code> functionality seems to overlap. <code>COMPILE_DEFINITIONS</code> property seems more flexible.</p>
  
  <p>So it seems that COMPILE_DEFINITIONS property does everything add_definitions does, and even more.</p>
  
  <p><strong>So, in which cases <em>must</em> we call add_definitions because COMPILE_DEFINITIONS property cannot be used?</strong></p>