<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-03-02 10:29 GMT+01:00 Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><br>
On 01/03/2014 15:46, Gautier DI FOLCO wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi chandlerc, hansw, chapuni,<br>
<br>
I just added an update command to ninja, now we can do $ ninja update, as we can do $ make update.<br>
</blockquote>
<br></div>
'make update' is currently only available in the traditional non-CMake makefiles.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<a href="http://llvm-reviews.chandlerc.com/D2908" target="_blank">http://llvm-reviews.chandlerc.<u></u>com/D2908</a><br>
<br>
Files:<br>
   CMakeLists.txt<br>
<br>
Index: CMakeLists.txt<br>
==============================<u></u>==============================<u></u>=======<br>
--- CMakeLists.txt<br>
+++ CMakeLists.txt<br>
@@ -569,3 +569,8 @@<br>
    endif()<br>
  endif()<br>
  +if(CMAKE_GENERATOR MATCHES "Ninja")<br>
+  add_custom_target(update<br>
+      COMMAND find "${CMAKE_CURRENT_SOURCE_DIR}" -name .svn -type d | sed -e 's/\\.svn//' | xargs svn update<br>
+  )<br>
+endif()<br>
</blockquote>
<br></div>
The patch isn't correct to conditionalize on Ninja alone -- if the feature is desirable it should be enabled with all CMake generators including Makefiles.<br>
<br>
However the invocation as proposed will fail to update source modules unless they're nested in the LLVM core source directory (ignoring e.g. side-by-side modules), and the shell invocations won't work at all on non-Unix platforms. So there are deeper problems here.<br>

<br>
Moreover the feature feels like an anachronism now that there are various version control systems in use. It also breaks the invariant that build commands issued from the build output directory can never modify the source tree.<br>

<br>
I won't weigh in on the value of keeping 'make update' support in the traditional Makefile build system but it doesn't feel right to bring it forward to CMake.<span class=""><font color="#888888"><br>
<br>
Alp.<br>
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</font></span></blockquote></div><br>In fact I have asked on ninja IRC channel and some time after that I have sent this patch, I was told that that it could be a problem if we call $ ninja update all (he also said that the same problem occurs with make).<br>
So that is really a bad idea.<br><br>Thanks for your time,<br>Sorry for that.<br></div></div>