[llvm-dev] Getting the LLVM includes to be recognized

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 15 23:25:22 PDT 2020

You seem to have added a target "myTool" to the LLVM sources. You must
tell CMake to add the required include path, etc. For instance, using

   target_link_libraries(myTool PUBLIC LLVMCore)

Not that alone will not be sufficient. I recommend Google'ing a
tutorial for what you are doing.

Btw, it is not recommended to work under the Administrator account.


Am Mi., 15. Apr. 2020 um 19:39 Uhr schrieb blackthirt33n . via
llvm-dev <llvm-dev at lists.llvm.org>:
> I am using the following cmake input :
> c:\Users\Administrator\Documents\programming\cmake-hello-clang\build>"c:\Program
>  Files\CMake\bin\cmake.exe" -GNinja -DCMAKE_MODULE_PATH="C:/Program Files (x86)/
> LLVM/lib/cmake" -DLLVM_INCLUDE_DIRS="C:/Program Files (x86)/LLVM/include" ..
> however when Ninja is run I get.
> c:\Users\Administrator\Documents\programming\cmake-hello-clang\build>ninja
> [1/2] Building CXX object CMakeFiles/myTool.dir/main.cpp.obj
> FAILED: CMakeFiles/myTool.dir/main.cpp.obj
> C:\PROGRA~2\LLVM\bin\CLANG_~1.EXE  -DGTEST_HAS_RTTI=0 -I"C:/Program Files (x86)/
> LLVM/include" -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependen
> ACROS -D__STDC_LIMIT_MACROS  -fno-exceptions -fno-rtti -std=gnu++14 -MD -MT CMak
> eFiles/myTool.dir/main.cpp.obj -MF CMakeFiles\myTool.dir\main.cpp.obj.d -o CMake
> Files/myTool.dir/main.cpp.obj -c ../main.cpp
> ../main.cpp:27:10: fatal error: 'llvm/Analysis/Verifier.h' file not found
> #include "llvm/Analysis/Verifier.h"
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~
> James
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

More information about the llvm-dev mailing list