[英]cmake libclang with homebrew llvm on macos
我嘗試使用帶有llvm(homebrew)的cquery在macOS上構建cquery,但是找不到某些lib。
$ LDFLAGS="-L/usr/local/opt/llvm/lib"
CPPFLAGS="-I/usr/local/opt/llvm/include"
cmake -DSYSTEM_CLANG=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) .
-- The CXX compiler identification is Clang 6.0.0
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using system Clang
CMake Error at /usr/local/Cellar/cmake/3.11.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Clang (missing: _libclang_LIBRARY _libclang_INCLUDE_DIR)
(found suitable version "6.0.0", minimum required is "6.0.0")
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.11.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindClang.cmake:93 (find_package_handle_standard_args)
CMakeLists.txt:91 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/vonfry/.local/src/cquery/CMakeFiles/CMakeOutput.log".
根據此頁面 ,將CMAKE_PREFIX_PATH
用於find_*
函數。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.