[llvm] r365836 - Fix build errors LLVM tests are disabled.
Diego Novillo via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 15:08:35 PDT 2019
Author: dnovillo
Date: Thu Jul 11 15:08:35 2019
New Revision: 365836
URL: http://llvm.org/viewvc/llvm-project?rev=365836&view=rev
Log:
Fix build errors LLVM tests are disabled.
Original patch from alanbaker at google.com
Fixes the error:
CMake Error in <...>/llvm/cmake/modules/CMakeLists.txt:
export called with target "LLVMTestingSupport" which requires target
"gtest" that is not in the export set.
This occurs when LLVM is embedded in a larger project, but is configured not to
include tests. If testing is disabled gtest isn't available and LLVM fails to
configure.
Differential revision: https://reviews.llvm.org/D63097
Modified:
llvm/trunk/lib/CMakeLists.txt
Modified: llvm/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CMakeLists.txt?rev=365836&r1=365835&r2=365836&view=diff
==============================================================================
--- llvm/trunk/lib/CMakeLists.txt (original)
+++ llvm/trunk/lib/CMakeLists.txt Thu Jul 11 15:08:35 2019
@@ -28,5 +28,7 @@ add_subdirectory(Passes)
add_subdirectory(TextAPI)
add_subdirectory(ToolDrivers)
add_subdirectory(XRay)
-add_subdirectory(Testing)
+if (LLVM_INCLUDE_TESTS)
+ add_subdirectory(Testing)
+endif()
add_subdirectory(WindowsManifest)
More information about the llvm-commits
mailing list