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

Philip Pfaffe via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 23 07:05:45 PST 2018


Hi Christophe,

I didn't fully get your setup. Is C:/Luciad_src/libs/LLVM where you
unpacked the sources? Or is that a build or install tree? If it is the
former, and your errors suggest that it is, then that's not how this works!

You need to point CMake to a built version of LLVM.

Now, I'm not familiar with the windows packaging, so I can't tell you
whether the binaries you downloaded already contained what you need.
Someone who's more familiar with the windows environment should chime in
here. On Linux at least there are dev packages available for this purpose,
so it's possible the windows distribution contains something like that.

Cheers,
Philip

2018-02-23 15:44 GMT+01:00 Christophe Demez via llvm-dev <
llvm-dev at lists.llvm.org>:

> 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
> --
> * Christophe Demez *
> PROJECT LEADER
>
> *LUCIAD* <http://www.luciad.com/>  CONNECT  •  VISUALIZE  •  ANALYZE  •
>  ACT
>
> christophe.demez at luciad.com   •  T +32 16 23 95 91
> <+32%2016%2023%2095%2091>
> Follow us on LinkedIn <https://www.linkedin.com/company/luciad> or
> @LUCIADconnect <http://www.twitter.com/LUCIADconnect>
>
> [image: Luciad]
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180223/f2622fca/attachment.html>


More information about the llvm-dev mailing list