[llvm-commits] [llvm] r158889 - in /llvm/trunk: cmake/modules/AddLLVM.cmake unittests/CMakeLists.txt
Chandler Carruth
chandlerc at gmail.com
Wed Jun 20 18:35:09 PDT 2012
Author: chandlerc
Date: Wed Jun 20 20:35:09 2012
New Revision: 158889
URL: http://llvm.org/viewvc/llvm-project?rev=158889&view=rev
Log:
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.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/unittests/CMakeLists.txt
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=158889&r1=158888&r2=158889&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Wed Jun 20 20:35:09 2012
@@ -82,7 +82,6 @@
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} )
Modified: llvm/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CMakeLists.txt?rev=158889&r1=158888&r2=158889&view=diff
==============================================================================
--- llvm/trunk/unittests/CMakeLists.txt (original)
+++ llvm/trunk/unittests/CMakeLists.txt Wed Jun 20 20:35:09 2012
@@ -10,7 +10,14 @@
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 @@
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
More information about the llvm-commits
mailing list