[Bf-committers] CMake cannot find system-wide LLVM installation

IRIE Shinsuke irieshinsuke at yahoo.co.jp
Sun Nov 4 17:52:33 CET 2012


Hi,

I'm using system-wide LLVM installed in /usr on Ubuntu 12.10, but
CMakeLists.txt cannot find it so I have to specify the directory
explicitly by a command line option -DLLVM_DIRECTORY=/usr.

The following patch should fix this bug:

Index: blender/CMakeLists.txt
===================================================================
--- blender/CMakeLists.txt      (revision 51867)
+++ blender/CMakeLists.txt      (working copy)
@@ -715,7 +715,7 @@
                set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH    "Path to the LLVM installation")
                set(LLVM_VERSION "3.0" CACHE STRING     "Version of LLVM to use")
                set(LLVM_STATIC YES)
-               if(LLVM_DIRECTORY)
+               if(EXISTS "${LLVM_DIRECTORY}/bin/llvm-config")
                        set(LLVM_CONFIG "${LLVM_DIRECTORY}/bin/llvm-config")
                else()
                        set(LLVM_CONFIG llvm-config)

-- 
IRIE Shinsuke


More information about the Bf-committers mailing list