Когда я пытаюсь скомпилировать простой main.cpp
, состоящий из:
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
CLION сообщает мне, что:
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
CMake Error at CMakeLists.txt:2 (project):
The CMAKE_C_COMPILER:
C:/cygwin64/bin/gcc.exe
is not a full path and was not found in the PATH.
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_CXX_COMPILER:
ссылаясь на файл C:/cygwin64/bin/g++.exe
.
Оба файла MAKE существуют в папке C:\cygwin64\bin
, и этот путь называется переменной среды в Windows.
Просмотр других вопросов, касающихся такого рода проблемы, я проверил настройки версии компилятора в CLION и у меня есть:

И настройки MAKE:

Может кто-нибудь сообщить, что мне здесь не хватает, чтобы программа могла быть построена и запущена?
В файле CMakeLists.txt
, который я также указали:
cmake_minimum_required(VERSION 3.16)
project(HelloWorld1)
set(CMAKE_C_COMPILER C:\cygwin64\bin)
set(CMAKE_CXX_COMPILER C:\cygwin64\bin)
add_executable(HelloWorld1 main.cpp)
Но результат все тот же.