[CMake] Use LINK_LIBS instead of target_link_libraries().
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Feb 2014 06:41:29 +0000 (06:41 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Feb 2014 06:41:29 +0000 (06:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202238 91177308-0d34-0410-b5e6-96231b3b80d8

lib/LineEditor/CMakeLists.txt
utils/unittest/CMakeLists.txt
utils/unittest/UnitTestMain/CMakeLists.txt

index cef36a40b474791f4dacff2e338e175a6cbfd49a..0dec256e41554064c5924682a08065b641c960c0 100644 (file)
@@ -1,7 +1,11 @@
+if(HAVE_LIBEDIT)
+  set(link_libs edit)
+endif()
+
 add_llvm_library(LLVMLineEditor
   LineEditor.cpp
-  )
 
-if(HAVE_LIBEDIT)
-  target_link_libraries(LLVMLineEditor edit)
-endif()
+  LINK_LIBS
+  LLVMSupport
+  ${link_libs}
+)
index 64446eff41d83fe9e86336cbdf7f9b61d3f0e94b..b6d2d6d9e0e99df82067d6182f3b3c9c15027538 100644 (file)
@@ -40,11 +40,9 @@ endif ()
 
 add_llvm_library(gtest
   googletest/src/gtest-all.cc
-  )
 
-# Depends on llvm::raw_ostream
-target_link_libraries(gtest
-  LLVMSupport
+  LINK_LIBS
+  LLVMSupport # Depends on llvm::raw_ostream
   )
 
 add_subdirectory(UnitTestMain)
index 5f3e6c1ec52c602936045b5632342246f71c4e78..65ef97b028162cce6e951fba78e27cb5c48d324a 100644 (file)
@@ -1,9 +1,7 @@
 add_llvm_library(gtest_main
   TestMain.cpp
-  )
 
-# Depends on llvm::cl
-target_link_libraries(gtest_main
+  LINK_LIBS
   gtest
-  LLVMSupport
+  LLVMSupport # Depends on llvm::cl
   )