[PATCH] D63097: [cmake] Don't add Support/Testing library if tests are not included
Alan Baker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 14:09:53 PDT 2019
alan-baker created this revision.
alan-baker added a reviewer: chandlerc.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D63097
Files:
lib/CMakeLists.txt
Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -27,5 +27,7 @@
add_subdirectory(TextAPI)
add_subdirectory(ToolDrivers)
add_subdirectory(XRay)
-add_subdirectory(Testing)
+if (${LLVM_INCLUDE_TESTING})
+ add_subdirectory(Testing)
+endif()
add_subdirectory(WindowsManifest)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63097.203896.patch
Type: text/x-patch
Size: 370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190610/f10ea762/attachment-0001.bin>
More information about the llvm-commits
mailing list