<div dir="ltr">These aren't demangle tests fwiw.  But that just complicates the cmake logic, and I don't see the benefit of doing so.  Writing 3k of data to the disk is hardly going to be a noticeable part of the configure step.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 6, 2018 at 3:22 PM Nico Weber 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">thakis added a comment.<br>
<br>
In <a href="https://reviews.llvm.org/D51561#1226388" rel="noreferrer" target="_blank">https://reviews.llvm.org/D51561#1226388</a>, @zturner wrote:<br>
<br>
> Doesn’t mean it’s a good or bad pattern, just that “only 1 file will use<br>
>  it” is already false, because we can make lldb use it as a followup and<br>
>  that will get many more.<br>
><br>
> I did think about alternative solutions, If this CL wasn’t here, the<br>
>  alternatives i came up would be to either not write this test, or spend<br>
>  several days/weeks writing a tool whose only purpose was to make it<br>
>  possible to write this test.<br>
<br>
<br>
If you're dead set on this approach, please do make it opt in. Something like:<br>
<br>
  function(add_file_reading_unittest test_suite test_name)<br>
    set(LLVM_UNITTEST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})<br>
    configure_file(<br>
      ${LLVM_MAIN_SRC_DIR}/unittests/<a href="http://unittest.cfg.in" rel="noreferrer" target="_blank">unittest.cfg.in</a><br>
      ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llvm.srcdir.txt)<br>
    add_unittests(test_suite test_name)<br>
  endfunction()<br>
<br>
...and then make DemangleTests call that function.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D51561" rel="noreferrer" target="_blank">https://reviews.llvm.org/D51561</a><br>
<br>
<br>
<br>
</blockquote></div>