I'm having 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 CMAKE_C_COMPILER and CMAKE_CXX_COMPILER environment variables 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 has persisted.
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 forgotten some basic step. Does anyone have any idea what might be causing the problem?