LLVM Beginner Question

Hello,

I am just getting started with LLVM and am having some build issues.
I am running Snow Leopard and like to use XCode as my IDE. I know
that I need to compile with llvm-config to get all of the proper build
settings. My question is how do I incorporate llvm-config into my
XCode project settings? I would prefer to not have to use the command
line to build.

Thanks,

Graham

Graham Hemingway <graham.hemingway@gmail.com> writes:

I am just getting started with LLVM and am having some build issues.
I am running Snow Leopard and like to use XCode as my IDE. I know
that I need to compile with llvm-config to get all of the proper build
settings. My question is how do I incorporate llvm-config into my
XCode project settings? I would prefer to not have to use the command
line to build.

Generate the XCode project with cmake. See

http://www.llvm.org/docs/CMake.html

You will want to do:

mkdir my-llvm-project-dir
cd my-llvm-project-dir

cmake -G Xcode path/to/llvm/source/root

open LLVM.xcodeproj

If you don't specify -G Xcode it will default to a make style project.

Ray

PS: BTW, I guess it is technically written Xcode, not XCode. The command might be case sensitive.
PPS: Someone should add the -G Xcode (and possibly other example targets to) example to the CMake.html doc.

Ray Fix <rayfix.ml@gmail.com> writes:

Generate the XCode project with cmake. See

http://www.llvm.org/docs/CMake.html

[snip]

PPS: Someone should add the -G Xcode (and possibly other example
targets to) example to the CMake.html doc.

The document explains how to list the available generators. It mentions
that generator's names are case-sensitive too.

Ah, ic. My apologies. I followed the first step of the getting started guide, “Read the documentation.” But then I forgot to follow the second step, “Read the documentation.” :wink:

Thanks.
Ray

Thank you two for your guidance. I have built LLVM and have a simple example problem up and running. Now comes the fun part.

Cheers,
Graham