title: CMake does not work with g++ installed with MinGW
body: <p>I try to make CMake work with my setup (windows 7, 64 bits). I have installed MingGW to have a C and C++ compiler. In the configuration of CMake I entered the following :
  for the C compiler : C:/MinGW/bin/mingw32-gcc.exe
  for the C++ compiler : C:/MinGW/bin/mingw32-g++.exe</p>
  
  <p>but when trying to run CMake on a project built with a CMakeList I get the following errors:</p>
  
  <p><em>The program can't start because libgmp-10.dll is missing from your computer. Try reinstalling the program to fix this problem.</em></p>
  
  <p>Here is the full ouput:</p>
  
  <blockquote>
    <p>The CXX compiler identification is unknown Check for working CXX
    compiler: C:/MinGW/bin/mingw32-g++.exe Check for working CXX compiler:
    C:/MinGW/bin/mingw32-g++.exe -- broken CMake Error at C:/Program
    Files/CMake/share/cmake-3.9/Modules/CMakeTestCXXCompiler.cmake:44
    (message):   The C++ compiler "C:/MinGW/bin/mingw32-g++.exe" is not
    able to compile a   simple test program.</p>
    
    <p>It fails with the following output:</p>
    
    <p>Change Dir: D:/Libraries/deformetrica/build/CMakeFiles/CMakeTmp</p>
    
    <p>Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_bbc9e/fast"</p>
    
    <p>C:/MinGW/bin/mingw32-make.exe -f
    CMakeFiles\cmTC_bbc9e.dir\build.make   CMakeFiles/cmTC_bbc9e.dir/build</p>
    
    <p>mingw32-make.exe[1]: Entering directory<br>
    'D:/Libraries/deformetrica/build/CMakeFiles/CMakeTmp'</p>
    
    <p>Building CXX object
    CMakeFiles/cmTC_bbc9e.dir/testCXXCompiler.cxx.obj</p>
    
    <p>C:\MinGW\bin\mingw32-g++.exe -o<br>
    CMakeFiles\cmTC_bbc9e.dir\testCXXCompiler.cxx.obj -c<br>
    D:\Libraries\deformetrica\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx</p>
    
    <p>CMakeFiles\cmTC_bbc9e.dir\build.make:64: recipe for target<br>
    'CMakeFiles/cmTC_bbc9e.dir/testCXXCompiler.cxx.obj' failed</p>
    
    <p>mingw32-make.exe[1]: ***<br>
    [CMakeFiles/cmTC_bbc9e.dir/testCXXCompiler.cxx.obj] Error 1</p>
    
    <p>mingw32-make.exe[1]: Leaving directory<br>
    'D:/Libraries/deformetrica/build/CMakeFiles/CMakeTmp'</p>
    
    <p>Makefile:125: recipe for target 'cmTC_bbc9e/fast' failed</p>
    
    <p>mingw32-make.exe: *** [cmTC_bbc9e/fast] Error 2</p>
    
    <p>CMake will not be able to correctly generate this project. Call
    Stack (most recent call first):   CMakeLists.txt:3 (project)</p>
    
    <p>Configuring incomplete, errors occurred! See also
    "D:/Libraries/deformetrica/build/CMakeFiles/CMakeOutput.log". See also
    "D:/Libraries/deformetrica/build/CMakeFiles/CMakeError.log".</p>
  </blockquote>
  
  <p>g++ was installed with MinGW and I did not see any error on the installation so I was wondering how this could be fixed ?</p>
  
  <p>Thanks a lot for your help !</p>