blackthirt33n . via llvm-dev
2020-Apr-16 00:38 UTC
[llvm-dev] Getting the LLVM includes to be recognized
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 t-lib=msvcrtd -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONS TDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SE CURE_NO_WARNINGS -DUNICODE -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_M 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200415/03b70c0b/attachment.html>
Michael Kruse via llvm-dev
2020-Apr-16 06:25 UTC
[llvm-dev] Getting the LLVM includes to be recognized
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. Michael 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 > t-lib=msvcrtd -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONS > TDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SE > CURE_NO_WARNINGS -DUNICODE -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_M > 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