title: Unable to specify the compiler with CMake
body: <p>I have a problem with this <code>CMakeLists.txt</code> file:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.6)
  
  SET(CMAKE_C_COMPILER C:/MinGW/bin/gcc)
  SET(CMAKE_CXX_COMPILER C:/MinGW/bin/g++)
  
  project(cmake_test)
  
  add_executable(a.exe test.cpp)
  </code></pre>
  
  <p>Calling cmake with: <code>cmake -G "MinGW Makefiles"</code> , it fails with the following output:</p>
  
  <pre><code>c:\Users\pietro.mele\projects\tests\buildSystem_test\cmake_test&gt;cmake -G "MinGW Makefiles" .
  -- The C compiler identification is GNU 4.6.1
  -- The CXX compiler identification is GNU 4.6.1
  -- Check for working C compiler: C:/MinGW/bin/gcc
  CMake Error: your C compiler: "C:/MinGW/bin/gcc" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
  CMake Error: Internal CMake error, TryCompile configure of cmake failed
  -- Check for working C compiler: C:/MinGW/bin/gcc -- broken
  CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
    The C compiler "C:/MinGW/bin/gcc" is not able to compile a simple test
    program.
  
  CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
  CMakeLists.txt:10 (project)
  
  CMake Error: your C compiler: "C:/MinGW/bin/gcc" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
  CMake Error: your CXX compiler: "C:/MinGW/bin/g++" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
  -- Configuring incomplete, errors occurred!
  </code></pre>
  
  <p>However the <code>gcc</code> compiler is in <code>C:/MinGW/bin/</code> and it works.</p>
  
  <p>Any idea?</p>
  
  <p>Platform:</p>
  
  <ul>
  <li>Windows 7  </li>
  <li>MinGW/GCC 4.6  </li>
  </ul>