<div dir="ltr">Hi Eric,<div><br></div><div>I created the folder manually, but it still did not extract to that folder. It appears to only be able to extract to the current folder. It 'is' able to create folders that are in the tar as expected.</div>
<div><br></div><div>- Saad<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 2, 2013 at 1:50 AM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">2013/4/2 Saad Khattak <span dir="ltr"><<a href="mailto:saadrustam@gmail.com" target="_blank">saadrustam@gmail.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 dir="ltr">Hi,<div><br></div><div>If I have the following command:</div><div><br></div><div><div> execute_process(</div><div> COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz</div><div> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}</div>
<div> )</div><div><br></div><div>the extraction works and extracts the tar in the current directory. But this:</div><div><br></div><div><div> execute_process(</div><div> COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz</div>
<div> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/someSubdirectory</div><div> )</div><div><br></div><div>fails to extract into 'someDirectory' (even if it already exists - although it 'should' create the directory for me).</div>
</div></div></div></blockquote><div><br></div></div></div><div>No it shouldn't.<br></div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div><div>
<div>Am I misunderstanding some commands?</div></div></div></div></blockquote><br></div></div><div class="gmail_quote">Yes I think you misunderstand "WORKING_DIRECTORY" argument of "execute_process" command.<br>
</div><div class="gmail_quote">The WORKING_DIRECTORY MUST exists beforehand and it is NOT the job of "execute_process"<br></div><div class="gmail_quote">to create it. <br><br></div><div class="gmail_quote">A "WORKING_DIRECTORY" is **always** supposed to exists when used <br>
by the cmake command providing this option like:<br>add_custom_command, add_test or execute_process.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">If you need to create a directory you can "cmake -E make_directory" <br>
</div><div class="gmail_quote">or "file(MAKE_DIRECTORY ...)"<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">That said "cmake -E tar xzf mySDK.tar.gz" will create any directory found in the archive as expected.<br>
</div><div class="gmail_quote">"working directory" for untar and "[possibly] top-level directory" created nby untar are not the same.<span class="HOEnZb"><font color="#888888"><br></font></span></div>
<span class="HOEnZb"><font color="#888888"><div class="gmail_quote"><br></div><br>-- <br>Erk<br>Le gouvernement représentatif n'est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a>
</font></span></div></div>
</blockquote></div><br></div></div></div>