<div dir="ltr">As far as I can tell, it does not extract at all.<div><br></div><div style>The return code when it is able to extract is 0, when it is not able to extract, it is 1</div><div style><br></div><div style>- Saad</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 6:12 PM, David Cole <span dir="ltr"><<a href="mailto:dlrdave@aol.com" target="_blank">dlrdave@aol.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Where does the extraction end up?<br>
<br>
Or does it fail regardless of the WORKING_DIRECTORY argument?<br>
<br>
Use :<br>
<br>
execute_process(... RESULT_VARIABLE rv)<br>
message("rv='${rv}'")<br>
<br>
to see what the return value of CMake is.<br>
<br>
Is there an error message when trying to extract the tar file?<div><div class="h5"><br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Saad Khattak <<a href="mailto:saadrustam@gmail.com" target="_blank">saadrustam@gmail.com</a>><br>
To: CMake Mailing List <<a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a>><br>
Sent: Mon, Apr 1, 2013 6:06 pm<br>
Subject: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories<br>
<br>
<br>
Hi,<br>
<br>
<br>
If I have the following command:<br>
<br>
<br>
<br>
execute_process(<br>
COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz<br>
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}<br>
)<br>
<br>
<br>
the extraction works and extracts the tar in the current directory. But this:<br>
<br>
<br>
<br>
execute_process(<br>
COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz<br>
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/<u></u>someSubdirectory<br>
)<br>
<br>
<br>
fails to extract into 'someDirectory' (even if it already exists - although it 'should' create the directory for me).<br>
<br>
<br>
Am I misunderstanding some commands?<br>
<br>
<br>
Thanks,<br>
Saad<br>
<br>
<br>
<br></div></div>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
<br>
</blockquote></div><br></div>