forked from OSchip/llvm-project
Generate the test configuration even when LIBCXX_INCLUDE_TESTS=OFF.
This patch changes the CMake configuration so that it always generates the test/lit.site.cfg file, even when testing is disabled. This allows users to test libc++ without requiring them to have a full LLVM checkout on their machine. llvm-svn: 296685
This commit is contained in:
parent
173e11439e
commit
d94189dc50
|
@ -19,7 +19,6 @@ set(CMAKE_MODULE_PATH
|
|||
${CMAKE_MODULE_PATH}
|
||||
)
|
||||
|
||||
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
project(libcxx CXX C)
|
||||
|
||||
|
@ -600,10 +599,15 @@ add_subdirectory(lib)
|
|||
if (LIBCXX_INCLUDE_BENCHMARKS)
|
||||
add_subdirectory(benchmarks)
|
||||
endif()
|
||||
|
||||
# Create the lit.site.cfg file even when LIBCXX_INCLUDE_TESTS is OFF or
|
||||
# LLVM_FOUND is OFF. This allows users to run the tests manually using
|
||||
# LIT without requiring a full LLVM checkout.
|
||||
add_subdirectory(test)
|
||||
if (LIBCXX_INCLUDE_TESTS)
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(lib/abi)
|
||||
endif()
|
||||
|
||||
if (LIBCXX_INCLUDE_DOCS)
|
||||
add_subdirectory(docs)
|
||||
endif()
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
include(AddLLVM) # for add_lit_testsuite
|
||||
|
||||
macro(pythonize_bool var)
|
||||
if (${var})
|
||||
set(${var} True)
|
||||
|
@ -66,12 +64,15 @@ if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
|
|||
list(APPEND LIBCXX_TEST_DEPS cxx_external_threads)
|
||||
endif()
|
||||
|
||||
add_lit_testsuite(check-cxx
|
||||
"Running libcxx tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS cxx ${LIBCXX_TEST_DEPS})
|
||||
if (LIBCXX_INCLUDE_TESTS)
|
||||
include(AddLLVM) # for add_lit_testsuite
|
||||
add_lit_testsuite(check-cxx
|
||||
"Running libcxx tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS cxx ${LIBCXX_TEST_DEPS})
|
||||
|
||||
add_custom_target(check-libcxx DEPENDS check-cxx)
|
||||
add_custom_target(check-libcxx DEPENDS check-cxx)
|
||||
endif()
|
||||
|
||||
if (LIBCXX_GENERATE_COVERAGE)
|
||||
include(CodeCoverage)
|
||||
|
|
Loading…
Reference in New Issue