title: How can I make CMake use Mingw-w64 gcc/g++?
body: <p>I am on Windwos trying to get Mingw-w64 to work with CMake since my MSVC is somehow not working at all (using Windows10 64bit.</p>
  
  <p>Basically I add the arguments <code>-DCMAKE_CXX_COMPILER="C:/MinGW-w64/mingw64/bin/g++.exe" -DCMAKE_C_COMPILER="C:/MinGW-w64/mingw64/bin/gcc.exe"</code> to my call to CMake which sets the corresponding compiler.</p>
  
  <p>However I get these errors:</p>
  
  <pre><code>-- The C compiler identification is unknown
  -- The CXX compiler identification is unknown
  -- Check for working C compiler: C:/MinGW-w64/mingw64/bin/gcc.exe
  -- Check for working C compiler: C:/MinGW-w64/mingw64/bin/gcc.exe -- broken
  CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
    The C compiler
  
      "C:/MinGW-w64/mingw64/bin/gcc.exe"
  
    is not able to compile a simple test program.
  </code></pre>
  
  <p>How could I get this to work?</p>