我正在安装cppinsights基于C ++ ClangAST的工具。我可以建立 cmake的源项目,但是当我运行make命令时,获取过程失败。
我用来构建项目的命令是:
CMAKE -STEP
此命令的输出为:
C编译器标识为GNU 5.4.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working CXX compiler: /home/praveen/ninja/bin/clang++
-- Check for working CXX compiler: /home/praveen/ninja/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found LLVM_CONFIG_PATH: /home/praveen/ninja/bin/llvm-config
// LLVM库的东西
llvm_config(LLVM_LIBDIR)=> / home / praveen / ninja / lib;
-- llvm_config(LLVM_INCLUDE_DIR)=>/home/praveen/llvm-novice/llvm/include;
-- llvm_config(LLVM_SYSTEM_LIBS)=>;
-- llvm_config(LLVM_PACKAGE_VERSION)=>6.0.0svn;
-- Git repo url: https://github.com/andreasfertig/cppinsights.git
-- Git commit hash: 5ce053d3f7bbd7dc0382385a499be13c99b67005
-- Generating version.h
-- Found clang-tidy: /home/praveen/ninja/bin/clang-tidy
-- Stripping executable
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.14") found
组件:氧点
-- Using CXX: /home/praveen/ninja/bin/clang++
-- Configuring done
-- Generating done
-- Build files have been written to: /home/praveen/cppinsight/build_00/build
制作-步骤
当我运行“ make”命令时,它会引发这样的错误
[7%]建立CXX对象 CMakeFiles / insights.dir / AutoStmtHandler.cpp.o
包含在以下文件中 /home/praveen/cppinsight/build_00/cppinsights/AutoStmtHandler.cpp:8:
/ home / praveen / cppinsight / build_00 / cppinsights /./ AutoStmtHandler.h:11:10: 致命错误:找不到'clang / AST / AST.h'文件
#include "clang/AST/AST.h"
产生了1个错误。
CMakeFiles / insights.dir / build.make:62:目标配方
'CMakeFiles / insights.dir / AutoStmtHandler.cpp.o'失败
make [2]:*** [CMakeFiles / insights.dir / AutoStmtHandler.cpp.o]错误1
CMakeFiles / Makefile2:131:目标配方 'CMakeFiles / insights.dir / all'失败
make 1:*** [CMakeFiles / insights.dir / all]错误2
Makefile:129:目标“全部”的配方失败
make:*** [全部]错误2
我不知道为什么在创建makefile时,构建文件不包括源目录。
请注意
LLVM_LIBDIR是/ home / praveen / ninja / lib
LLVM_INCLUDE_DIR是/ home / praveen / llvm-novice / llvm / include
那么,为了正确完成构建过程,我必须执行哪些步骤?
谢谢