title: CLion - CMake error while creating new project
body: <p>I just installed CLion on my computer with MinGW and decided to create a simple Hello World project to test it, but when I create it the console outputs an error:</p>
  
  <pre><code>&gt;"C:\Program Files (x86)\JetBrains\CLion 2016.3.3\bin\cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" "E:\Programação\C++\Hello World"
  
  &gt;-- The C compiler identification is GNU 5.3.0
  
  &gt;-- The CXX compiler identification is GNU 5.3.0
  
  &gt;-- Check for working C compiler: C:/MinGW/bin/gcc.exe
  
  &gt;-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
  
  &gt;CMake Error at C:/Program Files (x86)/JetBrains/CLion 2016.3.3/bin/cmake/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
    The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
    program.
  
  &gt;  It fails with the following output:
  
  &gt;   Change Dir: Hello World/cmake-build-debug/CMakeFiles/CMakeTmp
  
  
  
  &gt;  Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_11be0/fast"
  
  &gt;  C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_11be0.dir\build.make
    CMakeFiles/cmTC_11be0.dir/build
  
  &gt;  mingw32-make.exe[1]: Entering directory 'Hello
    World/cmake-build-debug/CMakeFiles/CMakeTmp'
  
  &gt;  Building C object CMakeFiles/cmTC_11be0.dir/testCCompiler.c.obj
  
  &gt;  C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_11be0.dir\testCCompiler.c.obj -c
    "Hello
    World\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c"
  
  &gt;  gcc.exe: error: Hello
    World\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file
    or directory
  
  &gt;  gcc.exe: fatal error: no input files
  
  &gt;  compilation terminated.
  
  &gt;  CMakeFiles\cmTC_11be0.dir\build.make:64: recipe for target
    'CMakeFiles/cmTC_11be0.dir/testCCompiler.c.obj' failed
  
  &gt;  mingw32-make.exe[1]: *** [CMakeFiles/cmTC_11be0.dir/testCCompiler.c.obj]
    Error 1
  
  &gt;  mingw32-make.exe[1]: Leaving directory 'Hello
    World/cmake-build-debug/CMakeFiles/CMakeTmp'
  
  &gt;  Makefile:125: recipe for target 'cmTC_11be0/fast' failed
  
  &gt;  mingw32-make.exe: *** [cmTC_11be0/fast] Error 2
  
  
  
  
  
  &gt;  CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:2 (project)
  
  
  &gt;-- Configuring incomplete, errors occurred!
  &gt;See also "Hello World/cmake-build-debug/CMakeFiles/CMakeOutput.log".
  &gt;See also "Hello World/cmake-build-debug/CMakeFiles/CMakeError.log".
  </code></pre>
  
  <p>From what I understood, it failed to create some files in the project directory. Does anyone know why?</p>
  
  <p>I should also point out that I was running into problems because my antivirus was detecting cmake temp files in appdata as viruses as well as the "Hello World\cmake-build-debug\CMakeFiles\3.6.3\CompilerIdC\a.exe" executable.</p>
  
  <p>EDIT:
  It looks like I finally fixed it. From what I understand gcc.exe was not recognizing the project directory because it had spaces and other symbols like "ç" and "ã". So changing some folder names fixed the problem. </p>