所以我正在尝试使用LLVM构建一个玩具编译器,我想使用CMake作为我的构建系统.我尝试使用LLVM网站上的示例CMakeLists.txt,但运行时遇到以下错误cmake:
CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:178 (include):
include could not find load file:
/usr/share/llvm/cmake/LLVMExports.cmake
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:181 (include):
include could not find load file:
/usr/share/llvm/cmake/LLVM-Config.cmake
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
Run Code Online (Sandbox Code Playgroud)
当我去调查问题时,我发现我的系统上的路径实际上是/usr/share/llvm-3.8/.当我尝试将路径更改为/usr/share/llvm/预期时,我收到另一个错误:
CMake Error at /usr/share/llvm/cmake/LLVMExports.cmake:1034 (message):
The imported target "LLVMSupport" references the file
"/usr/lib/libLLVMSupport.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved …Run Code Online (Sandbox Code Playgroud)