From 5fb5076e284e074c4113fdc309636b930c244c87 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 26 Feb 2014 06:41:29 +0000 Subject: [PATCH] [CMake] Use LINK_LIBS instead of target_link_libraries(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202238 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/LineEditor/CMakeLists.txt | 12 ++++++++---- utils/unittest/CMakeLists.txt | 6 ++---- utils/unittest/UnitTestMain/CMakeLists.txt | 6 ++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/LineEditor/CMakeLists.txt b/lib/LineEditor/CMakeLists.txt index cef36a40b47..0dec256e415 100644 --- a/lib/LineEditor/CMakeLists.txt +++ b/lib/LineEditor/CMakeLists.txt @@ -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} +) diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt index 64446eff41d..b6d2d6d9e0e 100644 --- a/utils/unittest/CMakeLists.txt +++ b/utils/unittest/CMakeLists.txt @@ -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) diff --git a/utils/unittest/UnitTestMain/CMakeLists.txt b/utils/unittest/UnitTestMain/CMakeLists.txt index 5f3e6c1ec52..65ef97b0281 100644 --- a/utils/unittest/UnitTestMain/CMakeLists.txt +++ b/utils/unittest/UnitTestMain/CMakeLists.txt @@ -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 )