[llvm-commits] [lld] r169794 - /lld/trunk/CMakeLists.txt
Michael J. Spencer
bigcheesegs at gmail.com
Mon Dec 10 15:52:35 PST 2012
Author: mspencer
Date: Mon Dec 10 17:52:34 2012
New Revision: 169794
URL: http://llvm.org/viewvc/llvm-project?rev=169794&view=rev
Log:
[CMake] Fix external llvm build. It needs to know where llvm-tblgen is.
Modified:
lld/trunk/CMakeLists.txt
Modified: lld/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/CMakeLists.txt?rev=169794&r1=169793&r2=169794&view=diff
==============================================================================
--- lld/trunk/CMakeLists.txt (original)
+++ lld/trunk/CMakeLists.txt Mon Dec 10 17:52:34 2012
@@ -29,6 +29,7 @@
ABSOLUTE)
include(AddLLVM)
+ include(TableGen)
include("${LLD_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
include(HandleLLVMOptions)
@@ -42,6 +43,13 @@
"${LLVM_MAIN_INCLUDE_DIR}")
link_directories("${PATH_TO_LLVM_BUILD}/lib")
+ if( EXISTS "${LLD_PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
+ set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
+ else()
+ # FIXME: This is an utter hack.
+ set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/Debug/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
+ endif()
+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
More information about the llvm-commits
mailing list