Windows用LLVMをビルドするためのcmakeでエラーが発生した場合の対処方法
cmake -G “MinGW Makefiles” -D CMAKE_INSTALL_PREFIX=C:\usr\LLVM ..
ところが、以下のようなエラーが発生して、Makefileが作成されません。
CMake Error at C:/usr/cmake/share/cmake-3.5/Modules/CMakeMinGWFindMake.cmake:22
(message):
sh.exe was found in your PATH, here:
C:/MinGW/msys/1.0/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
If you want to use a UNIX shell, then use MSYS Makefiles.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
— Configuring incomplete, errors occurred!
メッセージにMSYS Makefilesと出ているので、
cmakeコマンドのオプションを以下のようにしたところ、Makefileが作成できました。
cmake -G “MSYS Makefiles” -D CMAKE_INSTALL_PREFIX=C:\usr\LLVM ..
この記事へのコメントはこちら