Skip to content

Commit

Permalink
[CMake] Use LINK_LIBS instead of target_link_libraries().
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202238 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Feb 26, 2014
1 parent 9262808 commit 5fb5076
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 8 additions & 4 deletions lib/LineEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}
)
6 changes: 2 additions & 4 deletions utils/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 2 additions & 4 deletions utils/unittest/UnitTestMain/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)

0 comments on commit 5fb5076

Please sign in to comment.