[PATCH] D40280: [CMake][libcxx] Include AddLLVM needed for tests in the right context

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 19:17:19 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL319515: Include AddLLVM needed for tests in the right context (authored by phosek).

Changed prior to commit:
  https://reviews.llvm.org/D40280?vs=123711&id=125072#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D40280

Files:
  libcxx/trunk/CMakeLists.txt
  libcxx/trunk/test/CMakeLists.txt


Index: libcxx/trunk/test/CMakeLists.txt
===================================================================
--- libcxx/trunk/test/CMakeLists.txt
+++ libcxx/trunk/test/CMakeLists.txt
@@ -49,10 +49,6 @@
 
 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 @@
 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}
Index: libcxx/trunk/CMakeLists.txt
===================================================================
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -684,6 +684,7 @@
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40280.125072.patch
Type: text/x-patch
Size: 1421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171201/4d90072d/attachment-0001.bin>


More information about the cfe-commits mailing list