title: How to add preprocessor definition in CMAKE projet build by Yocto
body: <p>I'm working on a existant project that use CMake to configure and generate.
  The target is an ARM device, so I build all the system with Yocto/OpenEmbedded.</p>
  
  <p>I manage to build a recipe to build the cmake project.
  It looks like that:</p>
  
  <pre><code>DESCRIPTION = "FANN LIB"
  
  LICENSE = "CLOSED"
  
  inherit cmake
  
  SRCREV = "${AUTOREV}"
  
  PV = "1.0"
  
  SRC_URI = "git://github.com/libfann/fann.git;branch=master;protocol=git"
  
  S = "${WORKDIR}/git"
  BBCLASSEXTEND = "native" 
  
  FILES_${PN} += "/usr/lib/cmake/"
  </code></pre>
  
  <p>In the code there are "#ifdef DEBUG" that I would like to activate. So I would like to add DEBUG to the C/C++ Flags.</p>
  
  <p>I found that I could use</p>
  
  <pre><code>EXTRA_OECMAKE += "CXXFLAGS='-DDEBUG'"
  EXTRA_OECMAKE = "set(CMAKE_CXX_FLAGS "-DDEBUG")"
  </code></pre>
  
  <p>But booth replace all CFlags and that is not what I want (plus it broke compilation!)</p>
  
  <p>I just would like taht -DDEBUG is added when calling the compiler! :-)</p>
  
  <p>How can I add a preprocessor definition in a CMake based project in a Yocto recipe?</p>