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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296685 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-03-01 21:53:30 +00:00
parent 29ed46b12e
commit c57fb58f18
2 changed files with 14 additions and 9 deletions

View File

@@ -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)