File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,10 @@ if(CLANG_BUILT_STANDALONE)
118
118
set (LLVM_UTILS_PROVIDED ON )
119
119
set (CLANG_TEST_DEPS FileCheck count not )
120
120
endif ()
121
- set (UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR} /unittest )
122
- if (EXISTS ${UNITTEST_DIR} /googletest/include/gtest/gtest.h
123
- AND NOT EXISTS ${LLVM_LIBRARY_DIR} /${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
124
- AND EXISTS ${UNITTEST_DIR} /CMakeLists.txt )
125
- add_subdirectory (${UNITTEST_DIR} third-party/unittest )
126
- endif ()
121
+ endif ()
122
+
123
+ if (NOT TARGET llvm_gtest )
124
+ message (FATAL_ERROR "llvm-gtest not found. Please install llvm-gtest or disable tests with -DLLVM_INCLUDE_TESTS=OFF" )
127
125
endif ()
128
126
129
127
if (LLVM_LIT )
@@ -506,13 +504,11 @@ endif()
506
504
507
505
508
506
if ( CLANG_INCLUDE_TESTS )
509
- if (EXISTS ${LLVM_THIRD_PARTY_DIR} /unittest/googletest/include/gtest/gtest.h )
510
- add_subdirectory (unittests )
511
- list (APPEND CLANG_TEST_DEPS ClangUnitTests )
512
- list (APPEND CLANG_TEST_PARAMS
513
- clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
514
- )
515
- endif ()
507
+ add_subdirectory (unittests )
508
+ list (APPEND CLANG_TEST_DEPS ClangUnitTests )
509
+ list (APPEND CLANG_TEST_PARAMS
510
+ clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
511
+ )
516
512
add_subdirectory (test )
517
513
add_subdirectory (bindings/python/tests )
518
514
You can’t perform that action at this time.
0 commit comments