Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake: no CMAKE_C_COMPILER could be found with Ninja generator in Windows 10

I am trying to build the ParaView superbuild (https://gitlab.kitware.com/paraview/paraview-superbuild) using CMake on Windows 10. They recommend using the Ninja generator.

I downloaded Ninja and put it in C:/Ninja/ninja.exe

But I receive this error:

CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

Where can I find this compiler?

I installed Visual Studio 13 and 15 and tried to open cmake-gui from the developer's command prompt, but without success.

I have tried other generators. The ParaView superbuild does not work with visual studio. On my Mac I used Unix MakeFiles but in Windows 10 it doesn't work, this error appears:

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
like image 401
alo gon Avatar asked Oct 12 '25 01:10

alo gon


1 Answers

Use the VS2015 x64 Native Tools Command Prompt to run cmake-gui.

like image 160
Mathieu Westphal Avatar answered Oct 15 '25 10:10

Mathieu Westphal