1
I have the following problem when trying to build a project using Cmake:
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
I’m running the following: cmake .
The error also says that I should try to set the environment variables CMAKE_C_COMPILER and CMAKE_CX_COMPILER to the compiler path, so I did.
I set the variables to C:\MinGW\bin\gcc.exe
and C:\MinGW\bin\g++.exe
, respectively.
The error remained.
My Cmakelists file contains the following:
cmake_minimum_required(VERSION 2.8.9)
project (hello)
add_executable(hello helloworld.cpp)
I have no knowledge of Cmake, so consider that I may have overlooked some basic step. Does anyone have any idea what might be causing the problem?
This was not the problem. The compiler was ok. The answer below explains what was happening.
– Lucas Schneider