[llvm] r221592 - [CMake] llvm-c-test: Use libLLVM.so if it is available.
NAKAMURA Takumi
geek4civic at gmail.com
Mon Nov 10 07:04:26 PST 2014
Author: chapuni
Date: Mon Nov 10 09:04:26 2014
New Revision: 221592
URL: http://llvm.org/viewvc/llvm-project?rev=221592&view=rev
Log:
[CMake] llvm-c-test: Use libLLVM.so if it is available.
Modified:
llvm/trunk/tools/llvm-c-test/CMakeLists.txt
Modified: llvm/trunk/tools/llvm-c-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-c-test/CMakeLists.txt?rev=221592&r1=221591&r2=221592&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-c-test/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-c-test/CMakeLists.txt Mon Nov 10 09:04:26 2014
@@ -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()
More information about the llvm-commits
mailing list