summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-12-01 03:16:50 +0000
committerPetr Hosek <phosek@chromium.org>2017-12-01 03:16:50 +0000
commitaec189a8d17d840426dff40ad5ade0b532414014 (patch)
tree7a1dc5a5aee8895cfe9880684f4867ce1738d204
parent06f2e0050f42c70cbe59838ced1a145b19a2c075 (diff)
Include AddLLVM needed for tests in the right context
AddLLVM is needed for several functions that are used in tests and as such needs to be included from the right context which previously wasn't the case. Differential Revision: https://reviews.llvm.org/D40280 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319515 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt1
-rw-r--r--test/CMakeLists.txt11
2 files changed, 7 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0c4d1efb..29eef8f35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -684,6 +684,7 @@ if (LIBCXX_INCLUDE_TESTS)
endif()
if (LIBCXX_STANDALONE_BUILD AND EXISTS "${LLVM_MAIN_SRC_DIR}/utils/llvm-lit")
+ include(AddLLVM) # for get_llvm_lit_path
# Make sure the llvm-lit script is generated into the bin directory, and do
# it after adding all tests, since the generated script will only work
# correctly discovered tests against test locations from the source tree that
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 4c8ca8f6e..53c6416cc 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -49,10 +49,6 @@ set(LIBCXX_EXECUTOR "None" CACHE STRING
set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!")
-configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
-
set(LIBCXX_TEST_DEPS "")
if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY)
@@ -64,7 +60,12 @@ if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
endif()
if (LIBCXX_INCLUDE_TESTS)
- include(AddLLVM) # for add_lit_testsuite
+ include(AddLLVM) # for configure_lit_site_cfg and add_lit_testsuit
+
+ configure_lit_site_cfg(
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+ ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
+
add_lit_testsuite(check-cxx
"Running libcxx tests"
${CMAKE_CURRENT_BINARY_DIR}