diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-03-01 21:53:30 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-03-01 21:53:30 +0000 |
commit | d94189dc509e43bca20d0ca7fa18defbe07a082f (patch) | |
tree | 9d13c980371f22bb61e3cb7b0bfa1130705c7546 | |
parent | 173e11439ed367778a31955ef1e6e5c1f6174b65 (diff) | |
download | bcm5719-llvm-d94189dc509e43bca20d0ca7fa18defbe07a082f.tar.gz bcm5719-llvm-d94189dc509e43bca20d0ca7fa18defbe07a082f.zip |
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
-rw-r--r-- | libcxx/CMakeLists.txt | 8 | ||||
-rw-r--r-- | libcxx/test/CMakeLists.txt | 15 |
2 files changed, 14 insertions, 9 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index da9322e9ef2..2928fc4f23d 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -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() diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index ed183bc41cd..a047c430778 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -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) |