title: CMake fails to compile simple test, error 5 Access denied
body: <p>I'm fairly new to CMake, and I'm getting the following output when I try to compile. I've been at this all day to no avail - does anyone out there have experience with this? Permissions on the relevant directories and files seem fine. Any help much appreciated! Thanks</p>
  
  <pre><code>The C compiler identification is GNU 4.6.2
  The CXX compiler identification is GNU 4.6.2
  Check for working C compiler: C:/MinGW/bin/gcc.exe
  Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
  CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
    The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
    program.
  
    It fails with the following output:
  
     Change Dir: C:/buildtemp/CMakeFiles/CMakeTmp
  
  
  
    Run Build Command:C:/MinGW/bin/mingw32-make.exe
    "cmTryCompileExec2665670929/fast"
  
    C:/MinGW/bin/mingw32-make.exe -f
    CMakeFiles\cmTryCompileExec2665670929.dir\build.make
    CMakeFiles/cmTryCompileExec2665670929.dir/build
  
    process_begin: CreateProcess(C:\MinGW\bin\mingw32-make.exe,
    C:/MinGW/bin/mingw32-make.exe -f
    CMakeFiles\cmTryCompileExec2665670929.dir\build.make
    CMakeFiles/cmTryCompileExec2665670929.dir/build, ...) failed.
  
    make (e=5): Access is denied.
  
  
    mingw32-make.exe: *** [cmTryCompileExec2665670929/fast] Error 5
  
  
  
  
  
    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:2 (project)
  
  
  Configuring incomplete, errors occurred!
  </code></pre>