在macos

时间:2018-05-04 12:47:53

标签: macos cmake clang

我尝试使用带有llvm(自制软件)的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".

1 个答案:

答案 0 :(得分:0)

根据此page,对find_*函数使用List