[libcxx] r319515 - Include AddLLVM needed for tests in the right context
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 30 19:16:51 PST 2017
Author: phosek
Date: Thu Nov 30 19:16:50 2017
New Revision: 319515
URL: http://llvm.org/viewvc/llvm-project?rev=319515&view=rev
Log:
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
Modified:
libcxx/trunk/CMakeLists.txt
libcxx/trunk/test/CMakeLists.txt
Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=319515&r1=319514&r2=319515&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Thu Nov 30 19:16:50 2017
@@ -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
Modified: libcxx/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/CMakeLists.txt?rev=319515&r1=319514&r2=319515&view=diff
==============================================================================
--- libcxx/trunk/test/CMakeLists.txt (original)
+++ libcxx/trunk/test/CMakeLists.txt Thu Nov 30 19:16:50 2017
@@ -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}
More information about the cfe-commits
mailing list