On Tue, Nov 26, 2013 at 4:26 PM, Brad King <brad.k...@kitware.com> wrote:
The test fails for me with spaces in the path because you're writing > the extraction command into the script without quoting so the spaces > cause incorrect parsing at build time. You can write it as > > file(WRITE ... " > ... > set(extract_command "${extract_command}") > ... > ... COMMAND \${extract_command} ... > ... > ") > > so that the exact value of the command is stored in the script and > expanded when evaluated at build time. It is probably simplest to > refactor the default extraction command to be written into the script > in this way also. Then you simply don't generate the default when an > explicit command is passed. > > If I understand correctly what you mean, that would require either: - Duplicating the test for extensions in both the extract-<target>.cmake and the current location so that we can fail in CMake generation time if a file we don't know how to extract is passed or - Failing ("error: do not know how to extract...") only in compilation time Or maybe I'm missing something? The EXTRACT_COMMAND needs a way to have a placeholder for the file name > so that the caller does not need to know where ExternalProject keeps > the file after downloading. > > Actually, the test was wrong: the filename is automatically appended to the end. I. e. EXTRACT_COMMAND is exactly that: the command, not the command + filename: EXTRACT_COMMAND ${CMAKE_COMMAND} -E tar xvf not EXTRACT_COMMAND ${CMAKE_COMMAND} -E tar xvf /path/to/file However, the placeholder could prove useful if the filename needs to go in the middle of the EXTRACT_COMMAND. Do you have any suggestion of should I make something up, like, say, >#< ? I am attaching a new patch, which fixes the path-with-spaces issue. No placeholder has been implemented yet. > I don't understand the "...After you have been invited..." > > in http://www.cmake.org/Wiki/CMake/Git/Account#Git > > (who would know I need an invitation!?) > > The sentence immediately preceding that says "See our new maintainer > instructions to join" and has a link to the instructions. They have > a step for posting to this list for discussion. We invite productive > contributors for direct access in due time. > > My bad :-) I visited the link, read the instructions but on step 4 I was only reading until "Subscribe to the CMake Developers Mailing List". As I was already subscribed, I didn't look any further O:-) -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer)
epa-extract-command-20131127-1031.patch
Description: Binary data
-- Powered by www.kitware.com Visit other Kitware open-source projects at 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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers