title: CMake, choose Xcode compiler
body: <p>I know that until recently it was not possible to select any specific compiler for xcode projects generated by CMake (it would always choose xcodes default compiler). Anyways this post: <a href="http://cmake.3232098.n2.nabble.com/CMake-2-8-1-available-for-download-td4752230.html">http://cmake.3232098.n2.nabble.com/CMake-2-8-1-available-for-download-td4752230.html</a>
  makes me believe that it should be possible with a specific <strong>CMAKE_XCODE_ATTRIBUTE_</strong> flag by now.- Unfortunatelly I could neither find which flag is supposed to change xcodes compiler, nor a list of all xcode flags supported by CMake. </p>
  
  <p>I am using Xcode 4.2 and CMake 2.8.6, and I'd like to be able to switch between LLVM 3.0 and LLVM GCC 4.2 from within CMake.</p>
  
  <p>As I said a list, which lists all xcode flags I can change from within CMake would be great!</p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>with Cmake 2.8.6, if you want to generate an xcode project that does not default to Clang/LLVM 3.0, use the following:</p>
  
  <pre><code>set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
  </code></pre>