[CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories
Saad Khattak
saadrustam at gmail.com
Mon Apr 1 20:02:05 EDT 2013
As far as I can tell, it does not extract at all.
The return code when it is able to extract is 0, when it is not able to
extract, it is 1
- Saad
On Mon, Apr 1, 2013 at 6:12 PM, David Cole <dlrdave at aol.com> wrote:
> Where does the extraction end up?
>
> Or does it fail regardless of the WORKING_DIRECTORY argument?
>
> Use :
>
> execute_process(... RESULT_VARIABLE rv)
> message("rv='${rv}'")
>
> to see what the return value of CMake is.
>
> Is there an error message when trying to extract the tar file?
>
>
>
>
> -----Original Message-----
> From: Saad Khattak <saadrustam at gmail.com>
> To: CMake Mailing List <cmake at cmake.org>
> Sent: Mon, Apr 1, 2013 6:06 pm
> Subject: [CMake] CMake extracting tar via execute_process does not allow
> extraction in subdirectories
>
>
> Hi,
>
>
> If I have the following command:
>
>
>
> execute_process(
> COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
> )
>
>
> the extraction works and extracts the tar in the current directory. But
> this:
>
>
>
> execute_process(
> COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/**someSubdirectory
> )
>
>
> fails to extract into 'someDirectory' (even if it already exists -
> although it 'should' create the directory for me).
>
>
> Am I misunderstanding some commands?
>
>
> Thanks,
> Saad
>
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130401/59b8a209/attachment-0001.htm>
More information about the CMake
mailing list