CMake错误:此项目中使用以下变量,但它们设置为NOTFOUND。

时间:2017-06-17 13:21:36

标签: macos vim makefile cmake youcompleteme

我尝试生成makefile文件。 我用

cmake -G " Unix Makefiles" ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cp

它给了我以下结果:

Using libclang to provide semantic completion for C/C++/ObjC
CMake Warning at /usr/local/Cellar/cmake/3.8.2/share/cmake/Modules/FindBoost.cmake:765 (message):
  Imported targets not available for Boost version
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.8.2/share/cmake/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/Cellar/cmake/3.8.2/share/cmake/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENCIES)
  ycm/CMakeLists.txt:217 (find_package)


CMake Error at /usr/local/Cellar/cmake/3.8.2/share/cmake/Modules/FindBoost.cmake:1842 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  ycm/CMakeLists.txt:217 (find_package)


Using external libclang: /Library/Developer/CommandLineTools/usr/lib/libclang.dylib
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock/gtest
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock/gtest
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock/gtest
   used as include directory in directory /Users/shitfly/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock/gtest

-- Configuring incomplete, errors occurred!
See also "/Users/shitfly/ycm_build/CMakeFiles/CMakeOutput.log".

我想我已经在~ / .vim / bundle / YouCompleteMe已经在Vendle中安装了YCM,但可能没有,我该如何检查呢?

我检查了我的目录,我已经在Boost_INCLUDE_DIR(ADVANCED)中有这些目录

我该如何处理?

0 个答案:

没有答案