• 카테고리

    질문 & 답변
  • 세부 분야

    개발 도구

  • 해결 여부

    해결됨

CMake CLI 사용법 강의에서 빌드 명령어를 입력해도 빌드가 안되네요..

23.09.11 17:38 작성 23.09.11 17:42 수정 조회수 1.28k

0

현재 CMake CLI 사용법 강의 수강 중입니다. 4분 12초부터 나오는 Cmake 명령어를 입력해서 빌드하는 부분에서 막히고 있습니다.

 

1.입력한 명령어

moonhyung@DESKTOP-Q9M8J51:/mnt/c/ClionProjects/Practice-cmake.git/hello-cmake$ cmake -B build .

2.에러 메세지

CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):

Compatibility with CMake < 3.5 will be removed from a future version of

CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell

CMake that the project does not need compatibility with older versions.

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

-- Configuring incomplete, errors occurred!

 

3.원인으로 예상하는 부분 & 확인한 부분

- C컴파일러를 Cmake가 찾지 못해서 발생하는 에러라고 생각해서 아래 사항들을 확인해 보았습니다.

3-1) gcc 컴파일러 버전 확인 & Cmake 버전

Gcc 컴파일러 버전

  • Cmake 버전

3-2)환경변수 경로 확인 및 추가

CC=/usr/bin/gcc

CXX=/usr/bin/g++

답변 1

답변을 작성해보세요.

0

안녕하세요?

에러 메세지 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.를 살펴보면, Make 빌드 시스템이 설치 되지 않아서 발생하는 오류로 보입니다. 혹시 make가 설치 되어 있는지 확인해주실 수 있을까요?

❯ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

감사합니다.

make 설치하니 해결되었습니다.

감사합니다. ㅎㅎ

다행이네요! 답변 해결로 변경 부탁드릴께요! 그리고 원하시는 개발 도구로도 네이티브 빌드 시스템 파일들을 생성할 수 있으니 참고 부탁드려요.