summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-06-21 01:35:09 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-06-21 01:35:09 +0000
commite530d2ba4d14de6e58e937f39b9fb10604098c56 (patch)
tree1c16b568f701c51d614c303bdb76a474523f8963
parent28969b41392de338668f7a68f68aa036c2dfdd3c (diff)
downloadbcm5719-llvm-e530d2ba4d14de6e58e937f39b9fb10604098c56.tar.gz
bcm5719-llvm-e530d2ba4d14de6e58e937f39b9fb10604098c56.zip
Remove one of the LLVM-specific CMake hacks in favor of standard CMake
facilities. This was only used in one place in LLVM, and was used pervasively (but with different code!) in Clang. It has no advantages over the standard CMake facilities and in some cases disadvantages. llvm-svn: 158889
-rwxr-xr-xllvm/cmake/modules/AddLLVM.cmake1
-rw-r--r--llvm/unittests/CMakeLists.txt13
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index bfe5127a4b4..ea0cc6a8620 100755
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -82,7 +82,6 @@ macro(add_llvm_executable name)
add_executable(${name} ${ALL_FILES})
endif()
set(EXCLUDE_FROM_ALL OFF)
- target_link_libraries( ${name} ${LLVM_USED_LIBS} )
llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
if( LLVM_COMMON_DEPENDS )
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt
index 43896f57bbb..6af095e9200 100644
--- a/llvm/unittests/CMakeLists.txt
+++ b/llvm/unittests/CMakeLists.txt
@@ -10,7 +10,14 @@ function(add_llvm_unittest test_dirname)
if( NOT LLVM_BUILD_TESTS )
set(EXCLUDE_FROM_ALL ON)
endif()
+
add_llvm_executable(${test_name}Tests ${ARGN})
+ target_link_libraries(${test_name}Tests
+ gtest
+ gtest_main
+ LLVMSupport # gtest needs it for raw_ostream.
+ )
+
add_dependencies(UnitTests ${test_name}Tests)
set_target_properties(${test_name}Tests PROPERTIES FOLDER "Tests")
endfunction()
@@ -51,12 +58,6 @@ set(LLVM_LINK_COMPONENTS
Support
)
-set(LLVM_USED_LIBS
- gtest
- gtest_main
- LLVMSupport # gtest needs it for raw_ostream.
- )
-
add_llvm_unittest(ADT
ADT/APFloatTest.cpp
ADT/APIntTest.cpp
OpenPOWER on IntegriCloud