title: CMake : Changing name of Visual Studio and Xcode exectuables depending on configuration in a project generated by CMake
body: <p>What I need to do is to setup my excecutable name to be</p>
  
  <pre><code>program-debug for debug builds and 
  program-release(or whatever) for other builds
  </code></pre>
  
  <p>I want to do it in a true cross-platform way and what is also very important - I want to target XCode and VS2008 - so when I change configuration in a kind of drop-down list, it must also have correct names for output! I do no want to regenerate .vcproj or .xcodeproj with other -D option (but I will have to if will not found a solution) </p>
  
  <p>AFAIK cmake variable CMAKE_BUILD_TYPE should work for make-based generators - in is evaluated <strong>at make time</strong> (Correct me if I am wrong)</p>
  
  <p>Basically it is how to setup target options (not nessesary name) depending on configuration in some IDEs/build system. It can be too specific for overall cmake goals, but maybe you can help.</p>
  
  <p>Thanks a lot!</p>