[LLVMbugs] [Bug 18597] New: Problem with add_llvm_loadable_module/LLVM_LIBRARY_OUTPUT_INTDIR
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jan 23 21:55:32 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18597
Bug ID: 18597
Summary: Problem with
add_llvm_loadable_module/LLVM_LIBRARY_OUTPUT_INTDIR
Product: Build scripts
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: cmake
Assignee: unassignedbugs at nondot.org
Reporter: holt.bg at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Recent changes seem to have broken my ability to build LLVM passes out of
source using CMake.
The problem seems to be with recent commits that introduce
LLVM_RUNTIME_OUTPUT_INTDIR. Specifically, r198205 uses
LLVM_RUNTIME_OUTPUT_INTDIR and LLVM_LIBRARY_OUTPUT_INTDIR (introduced recently
by "NAKAMURA Takumi <geek4civic at gmail.com>") in `add_llvm_loadable_module`.
However, these variables are only set in CMakeLists.txt, which means that when
building out of source, they are not available.
What I think needs to happen is these variables need to make their way into
LLVMConfig.cmake.in so that they'll be set when external CMake projects load
LLVM's CMake modules.
The following extremely simple patch fixed the problem for me.
------------------------------------------------
diff --git a/cmake/modules/LLVMConfig.cmake.in
b/cmake/modules/LLVMConfig.cmake.in
index 5e38d82..f1531b4 100644
--- a/cmake/modules/LLVMConfig.cmake.in
+++ b/cmake/modules/LLVMConfig.cmake.in
@@ -14,6 +14,9 @@ set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@)
set(LLVM_TARGETS_WITH_JIT @LLVM_TARGETS_WITH_JIT@)
+set(LLVM_RUNTIME_OUTPUT_INTDIR @LLVM_RUNTIME_OUTPUT_INTDIR@)
+set(LLVM_LIBRARY_OUTPUT_INTDIR @LLVM_LIBRARY_OUTPUT_INTDIR@)
+
@all_llvm_lib_deps@
set(TARGET_TRIPLE "@TARGET_TRIPLE@")
------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140124/7931826b/attachment.html>
More information about the llvm-bugs
mailing list