title: Why does Cmake Always Choose GCC?
body: <p>For reasons that I cannot completely understand, Cmake awlays chooses the GNU compiler toolset when compiling software. </p>
  
  <p>My enviroment looks like this:</p>
  
  <pre><code>which cc
  /opt/cray/xt-asyncpe/4.9/bin/cc
  which CC
  /opt/cray/xt-asyncpe/4.9/bin/CC
  echo $CC
  /opt/cray/xt-asyncpe/4.9/bin/cc
  echo $CXX
  /opt/cray/xt-asyncpe/4.9/bin/CC
  </code></pre>
  
  <p>but when I use cmake I get this </p>
  
  <pre><code>Using existing /opt/cmake/2.8.4/bin/cmake
  -- The C compiler identification is GNU
  -- The CXX compiler identification is GNU
  -- Check for working C compiler: /usr/bin/gcc
  -- Check for working C compiler: /usr/bin/gcc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  </code></pre>
  
  <p>And it builds all the software with g++ commands. Why is this going on? How does one set the compiler?</p>