This will remove the ability to use llvm-lit script even if source tree is available.<br><br>Can you put this behind a check that for standalone build?<br><br>Also, why was this just found?  shouldnt this have been failing on Apple’s libcxx for the past several months?<br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 1, 2017 at 4:38 PM Volodymyr Sapsai via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">vsapsai created this revision.<br>
Herald added a subscriber: mgorny.<br>
<br>
Fixes error<br>
<br>
> CMake Error at test/CMakeLists.txt:52 (configure_lit_site_cfg):<br>
>  Unknown CMake command "configure_lit_site_cfg".<br>
<br>
configure_lit_site_cfg is defined in AddLLVM module and not available<br>
without LLVM source tree. Revert back to configure_file (reverts part of<br>
r313643).  It is possible as libcxx/test/<a href="http://lit.site.cfg.in" rel="noreferrer" target="_blank">lit.site.cfg.in</a> doesn't use<br>
latest lit capabilities.<br>
<br>
Tested with<br>
<br>
- in-tree libcxx - no change in generated lit.site.cfg and running tests;<br>
- standalone libcxx with lit checked out next to it - no CMake errors.<br>
<br>
If there are other tricky configurations worth testing, let me know.<br>
<br>
rdar://problem/35303262<br>
<br>
<br>
<a href="https://reviews.llvm.org/D39520" rel="noreferrer" target="_blank">https://reviews.llvm.org/D39520</a><br>
<br>
Files:<br>
  libcxx/test/CMakeLists.txt<br>
<br>
<br>
Index: libcxx/test/CMakeLists.txt<br>
===================================================================<br>
--- libcxx/test/CMakeLists.txt<br>
+++ libcxx/test/CMakeLists.txt<br>
@@ -49,9 +49,10 @@<br>
<br>
 set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!")<br>
<br>
-configure_lit_site_cfg(<br>
+configure_file(<br>
   ${CMAKE_CURRENT_SOURCE_DIR}/<a href="http://lit.site.cfg.in" rel="noreferrer" target="_blank">lit.site.cfg.in</a><br>
-  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)<br>
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg<br>
+  @ONLY)<br>
<br>
 set(LIBCXX_TEST_DEPS "")<br>
<br>
<br>
<br>
</blockquote></div>