[PATCH] D34520: Minor correctness improvements for LLVMTestingSupport
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 10:54:39 PDT 2017
zturner created this revision.
Herald added subscribers: hiraditya, mgorny.
https://reviews.llvm.org/D34520
Files:
llvm/lib/CMakeLists.txt
llvm/lib/Testing/Support/CMakeLists.txt
Index: llvm/lib/Testing/Support/CMakeLists.txt
===================================================================
--- llvm/lib/Testing/Support/CMakeLists.txt
+++ llvm/lib/Testing/Support/CMakeLists.txt
@@ -9,4 +9,4 @@
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
-target_link_libraries(LLVMTestingSupport PRIVATE gtest)
\ No newline at end of file
+target_link_libraries(LLVMTestingSupport INTERFACE gtest)
\ No newline at end of file
Index: llvm/lib/CMakeLists.txt
===================================================================
--- llvm/lib/CMakeLists.txt
+++ llvm/lib/CMakeLists.txt
@@ -24,4 +24,9 @@
add_subdirectory(Passes)
add_subdirectory(ToolDrivers)
add_subdirectory(XRay)
-add_subdirectory(Testing)
+
+if (LLVM_INCLUDE_TESTS AND LLVM_INCLUDE_UTILS)
+ # Testing library depends on gtest, which is only included if
+ # both of these variables are ON.
+ add_subdirectory(Testing)
+endif()
\ No newline at end of file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34520.103603.patch
Type: text/x-patch
Size: 1046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170622/a5533071/attachment.bin>
More information about the llvm-commits
mailing list