[llvm-dev] cmake + llvm : issue when embedding llvm

Christophe Demez via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 23 06:44:42 PST 2018


Hi everybody,

I'm trying to build my own project that use LLVM. I downloaded the 
source code and the pre-compiled package on the official web site (last 
version):

     http://releases.llvm.org/download.html

I downloaded the following :

     LLVM source code
     Clang for Windows (64-bit)

FYI, I don't build LLVM... only want to use it !

I followed the instruction here ( 
http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project ), in the 
section : "Embedding LLVM in your project".

So, I added this code into my cmake file :

   find_package(LLVM REQUIRED CONFIG)
   message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
   message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
   message("LLVM_INCLUDE_DIRS=${LLVM_INCLUDE_DIRS}")
   message("LLVM_DEFINITIONS=${LLVM_DEFINITIONS}")

But I got several cmake error messages, here is my output :

     -- Using LLVMConfig.cmake in: 
C:\\Luciad_src\\libs\\LLVM\\cmake\\modules
     LLVM_INCLUDE_DIRS=
     LLVM_DEFINITIONS=
     CMake Error at 
C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:31 (list):
       list sub-command REMOVE_ITEM requires two or more arguments.
     Call Stack (most recent call first):
       C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:256 
(is_llvm_target_library)
       components/query/CMakeLists.txt:15 (llvm_map_components_to_libnames)

Is there a problem with my script, or the packages I use ? Any idea ?

Thanks for your help

-- 
Luciad Email Signature *Christophe Demez *
PROJECT LEADER

*LUCIAD* <http://www.luciad.com/> CONNECT •  VISUALIZE •  ANALYZE •  ACT

christophe.demez at luciad.com <mailto:christophe.demez at luciad.com> •  T 
+32 16 23 95 91
Follow us on LinkedIn <https://www.linkedin.com/company/luciad>or 
@LUCIADconnect <http://www.twitter.com/LUCIADconnect>

Luciad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180223/89b5cfe8/attachment.html>


More information about the llvm-dev mailing list