[LLVMdev] Building on LLVM on OSX: invalid install?
Sensei
senseiwa at gmail.com
Sat Dec 29 02:38:39 PST 2012
Dear all,
I am trying to move a project from Linux to OSX, with bad results at my
first attempt. First, I am using LLVM 3.2, the latest version, compiled
from sources (configured with just the install prefix, vanilla for other
options).
By the way, I found it annoying to reinstall LLVM, I expected a complete
and working LLVM environment with Apple's move to CLANG, but maybe I
didn't try that hard.
Anyway, this is my lines on CMakeLists.txt, working on linux like a charm:
########### LLVM ##########
SET (LLVM_ROOT "" CACHE PATH "Root of LLVM install.")
IF (NOT EXISTS ${LLVM_ROOT}/include/llvm)
MESSAGE (FATAL_ERROR "LLVM_ROOT (${LLVM_ROOT}) is not a valid LLVM
install")
ENDIF ()
SET (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_ROOT}/share/llvm/cmake")
INCLUDE (LLVMConfig)
LLVM_MAP_COMPONENTS_TO_LIBRARIES (REQ_LLVM_LIBRARIES jit native)
###########################
Then, I try to cmake my project:
% cmake .. -DLLVM_ROOT=/Applications/Development/llvm/
CMake Error at CMakeLists.txt:25 (INCLUDE):
include could not find load file:
LLVMConfig
CMake Error at CMakeLists.txt:26 (LLVM_MAP_COMPONENTS_TO_LIBRARIES):
Unknown CMake command "LLVM_MAP_COMPONENTS_TO_LIBRARIES".
-- Configuring incomplete, errors occurred!
It turns out, no file matching LLVMConfig is found on OSX, in my
installation at least, and even making share/llvm and copying "cmake"
from the initial tarball doesn't work.
% ls share/llvm/cmake
README config-ix.cmake* modules/ platforms/
Can anyone point me in the right direction?
Thanks & Cheers!
More information about the llvm-dev
mailing list