projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8abc4c
)
[CMake] llvm-c-test: Use libLLVM.so if it is available.
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Mon, 10 Nov 2014 15:04:26 +0000
(15:04 +0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Mon, 10 Nov 2014 15:04:26 +0000
(15:04 +0000)
llvm-svn: 221592
llvm/tools/llvm-c-test/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/llvm/tools/llvm-c-test/CMakeLists.txt
b/llvm/tools/llvm-c-test/CMakeLists.txt
index
34fea3d
..
989678b
100644
(file)
--- a/
llvm/tools/llvm-c-test/CMakeLists.txt
+++ b/
llvm/tools/llvm-c-test/CMakeLists.txt
@@
-7,6
+7,10
@@
set(LLVM_LINK_COMPONENTS
Target
)
+if(TARGET LLVM)
+ set(LLVM_LINK_COMPONENTS)
+endif()
+
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wstrict-prototypes")
endif ()
@@
-21,3
+25,8
@@
add_llvm_tool(llvm-c-test
object.c
targets.c
)
+
+# Use libLLVM.so if it is available.
+if(TARGET LLVM)
+ target_link_libraries(llvm-c-test LLVM)
+endif()