0

I was able to compile zlib yesterday with CMake but the only possible change was installing Windows 10 SDK 10.0.14393.33 and now that I configure it with the same choice (Visual Studio 14 2015 win64) I get the following error: enter image description here

enter image description here

Any idea what could have gone wrong and how to fix it?

The C compiler identification is unknown
CMake Error: Could not find cmake module file: C:/Users/mona/playing-for-data/renderdoc/renderdoc/3rdparty/zlib/build /CMakeFiles/3.7.1/CMakeCCompiler.cmake
CMake Error at CMakeLists.txt:4 (project):
  No CMAKE_C_COMPILER could be found.


Configuring incomplete, errors occurred!
See also "C:/Users/mona/playing-for-data/renderdoc/renderdoc/3rdparty/zlib/build /CMakeFiles/CMakeOutput.log".
See also "C:/Users/mona/playing-for-data/renderdoc/renderdoc/3rdparty/zlib/build /CMakeFiles/CMakeError.log".
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
  • In the path to missed module file `C:/Users/mona/playing-for-data/renderdoc/renderdoc/3rdparty/zlib/build /CMakeFiles/3.7.1/CMakeCCompiler.cmake` there is a space after the 'build' component. Probably, it is a reason of such fault. – Tsyvarev Dec 16 '16 at 07:55

2 Answers2

1

well, really weird but turns out you have to run CMake with right clicking on the executable and running it as admin. I am not sure if this is the correct solution but now it is working!!!

Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
1

I had a similar problem (running CMake in admin mode does change the search PATH environment it runs in).

This problem is specific to msbuild and also does occur only in newer versions of CMake because the default build program was changed from devenv to msbuild.

What did help in my case was to put the following code in my VS toolchain file:

if (CMAKE_VS_DEVENV_COMMAND)
    set(CMAKE_MAKE_PROGRAM "${CMAKE_VS_DEVENV_COMMAND}" CACHE INTERNAL "")
endif()
Florian
  • 39,996
  • 9
  • 133
  • 149