Как исправить «CMAKE_CXX_COMPILER: cl не полный путь и не был найден в PATH». ошибка? - PullRequest
0 голосов
/ 04 апреля 2019

Я пытаюсь скомпилировать отредактированную версию LLVM & Clang

Чтобы скомпилировать LLVM, я использую следующую команду:

cmake -DLLVM_DEFAULT_TARGET_TRIPLE=powerpc-unknown-unknown-unknown -DPYTHON_EXECUTABLE="C:\Python27" -DLLVM_TARGETS_TO_BUILD="PowerPC" -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/NewerSMBW-LLVM" "E:\llvm"

Я пытался с CMD Windows и Visual Studio Developper CMDи оба не работают

, но когда я пытаюсь скомпилировать его, я всегда получаю эту ошибку:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  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 Error at CMakeLists.txt:3 (project):
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "E:/llvm/CMakeFiles/CMakeOutput.log".
See also "E:/llvm/CMakeFiles/CMakeError.log".

Я уже пытался скомпилировать его в Ubuntu, и он работал хорошо, онзапустил очень долгую компиляцию и работал отлично, но мне она нужна для windows (например, для файлов .exe), поэтому, пожалуйста, если кто-то может помочь мне решить проблему, которая была бы крутой

Дополнительная информация: я использую rev.184655 из LLVM & clang, который я получил с помощью SVN, и я отредактировал его с помощью патча .diff, найденного в Интернете.

...