[CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.
llvm-svn: 197688
This commit is contained in:
parent
5de6b43898
commit
ed79c96f89
|
|
@ -390,8 +390,14 @@ option(CLANG_INCLUDE_TESTS
|
|||
${LLVM_INCLUDE_TESTS})
|
||||
|
||||
if( CLANG_INCLUDE_TESTS )
|
||||
if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
|
||||
add_subdirectory(unittests)
|
||||
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
||||
list(APPEND CLANG_TEST_PARAMS
|
||||
clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
|
||||
)
|
||||
endif()
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(unittests)
|
||||
endif()
|
||||
|
||||
option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."
|
||||
|
|
|
|||
|
|
@ -38,13 +38,6 @@ set(CLANG_TEST_PARAMS
|
|||
clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
)
|
||||
|
||||
if(CLANG_INCLUDE_TESTS)
|
||||
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
||||
list(APPEND CLANG_TEST_PARAMS
|
||||
clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
||||
)
|
||||
endif()
|
||||
|
||||
if( NOT CLANG_BUILT_STANDALONE )
|
||||
list(APPEND CLANG_TEST_DEPS
|
||||
llvm-config
|
||||
|
|
|
|||
Loading…
Reference in New Issue