X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FCMake.html;h=c822ed7dfabaf421e0b033a81a7210eff4422c37;hb=705f2431a086bbe662bca0035938e774378de3ec;hp=8ea4377dd51fec72fbf22a6cb7b8d72ed6d1f2e5;hpb=05d0265fef651de152c8127aa701e689555649f3;p=oota-llvm.git diff --git a/docs/CMake.html b/docs/CMake.html index 8ea4377dd51..c822ed7dfab 100644 --- a/docs/CMake.html +++ b/docs/CMake.html @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> + Building LLVM with CMake @@ -41,7 +42,7 @@ -
+

CMake is a cross-platform build-generator tool. CMake does not build the project, it generates @@ -64,7 +65,7 @@ -

+

We use here the command-line, non-interactive CMake interface

@@ -117,7 +118,7 @@ -
+

This section explains basic aspects of CMake, mostly for explaining those options which you may need on your day-to-day @@ -144,7 +145,7 @@ text. Generator's names are case-sensitive. Example:

-

cmake -G "Visual Studio 8 2005" path/to/llvm/source/root

+

cmake -G "Visual Studio 9 2008" path/to/llvm/source/root

For a given development platform there can be more than one @@ -165,7 +166,7 @@ -

+

Variables customize how the build will be generated. Options are boolean variables, with possible values ON/OFF. Options and @@ -194,14 +195,12 @@

cmake -DVARIABLE:TYPE=value path/to/llvm/source

-
-

Frequently-used CMake variables

-
+

Here are listed some of the CMake variables that are used often, along with a brief explanation and LLVM-specific notes. For full @@ -244,14 +243,14 @@ LLVM-specific variables -

+
LLVM_TARGETS_TO_BUILD:STRING
Semicolon-separated list of targets to build, or all for building all targets. Case-sensitive. For Visual C++ defaults to X86. On the other cases defaults to all. Example: - -DLLVM_TARGETS_TO_BUILD="X86;PowerPC;Alpha".
+ -DLLVM_TARGETS_TO_BUILD="X86;PowerPC".
LLVM_BUILD_TOOLS:BOOL
Build LLVM tools. Defaults to ON. Targets for building each tool @@ -342,7 +341,7 @@ on Visual C++ and Xcode, "-sv" on others.
-
LLVM_LIT_TOOLS_DIR:STRING
+
LLVM_LIT_TOOLS_DIR:PATH
The path to GnuWin32 tools for tests. Valid on Windows host. Defaults to "", then Lit seeks tools according to %PATH%. Lit can find tools(eg. grep, sort, &c) on LLVM_LIT_TOOLS_DIR at first, @@ -353,17 +352,24 @@ Function Interface library. If the library or its headers are installed on a custom location, you can set the variables FFI_INCLUDE_DIR and FFI_LIBRARY_DIR. Defaults to OFF.
+ +
LLVM_CLANG_SOURCE_DIR:PATH
+
Path to Clang's source directory. Defaults to tools/clang. + Clang will not be built when it is empty or it does not point valid + path.
+
+

Executing the test suite

-
+

Testing is performed when the check target is built. For instance, if you are using makefiles, execute this command while on @@ -383,7 +389,7 @@ -

+

See this wiki page for generic instructions on how to cross-compile @@ -404,7 +410,7 @@ -

+

The most difficult part of adding LLVM to the build of a project is to determine the set of LLVM libraries corresponding to the set @@ -421,10 +427,11 @@ endif() # We incorporate the CMake features provided by LLVM: set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_ROOT}/share/llvm/cmake") - include(LLVM) + include(LLVMConfig) # Now set the header and library paths: - include_directories( ${LLVM_ROOT}/include ) - link_directories( ${LLVM_ROOT}/lib ) + include_directories( ${LLVM_INCLUDE_DIRS} ) + link_directories( ${LLVM_LIBRARY_DIRS} ) + add_definitions( ${LLVM_DEFINITIONS} ) # Let's suppose we want to build a JIT compiler with support for # binary code (no interpreter): llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit native) @@ -459,14 +466,12 @@

-
-

Developing LLVM pass out of source

-
+

It is possible to develop LLVM passes against installed LLVM. An example of project layout provided below:

@@ -518,23 +523,23 @@
+
+

Compiler/Platform specific topics

-
+

Notes for specific compilers and/or platforms.

-
-

Microsoft Visual C++

-
+
LLVM_COMPILER_JOBS:STRING
@@ -546,6 +551,8 @@
+
+