我在我的项目中使用llvm,并在cmake的find_package(LLVM REQUIRED CONFIG)
中找到它。
配置失败,并显示消息:
[cmake] CMake Error at /Applications/CMake.app/Contents/share/cmake-3.23/Modules/Internal/CheckSourceCompiles.cmake:44 (message):
[cmake] check_source_compiles: C: needs to be enabled before use.
[cmake] Call Stack (most recent call first):
[cmake] /Applications/CMake.app/Contents/share/cmake-3.23/Modules/CheckCSourceCompiles.cmake:76 (cmake_check_source_compiles)
[cmake] /usr/local/lib/cmake/llvm/FindTerminfo.cmake:21 (check_c_source_compiles)
[cmake] /usr/local/lib/cmake/llvm/LLVMConfig.cmake:242 (find_package)
[cmake] tools/driver/CMakeLists.txt:6 (find_package)
[cmake]
[cmake]
[cmake] -- Could NOT find Terminfo (missing: Terminfo_LINKABLE)
[cmake] -- Configuring incomplete, errors occurred!
怎么修?
1条答案
按热度按时间xoefb8l81#
它实际上是clang-14和更高版本中著名的issue。
临时解决方案是在项目中使用C语言。