On Tue, Nov 12, 2013 at 3:06 PM, Jakub Zakrzewski <[email protected]> wrote:
> Did you try: "\\share.host/foo/bar/%(algo)/%(hash)"? (probably you gonna need 
> proper escaping).
> Note, that UNC paths begin with "\\" and in this case they cannot be 
> substitued with "//". Also - this is windows-only.

This is all rather interesting, and does look a bit broken to me.

The setup:

A file, foo.img with SHA256
b05528ba594ae4d6ca2b7b76ce02694e19a1c6d9d51b507e7b63d1919cb86e94.  I
copy it to 
smb://share.host/foo/bar/SHA256/b05528ba594ae4d6ca2b7b76ce02694e19a1c6d9d51b507e7b63d1919cb86e94.
 Then map R: to smb://share.host/foo.

I put the following into my CMakeLists.txt:

~~~~
set(ExternalData_LINK_CONTENT "SHA256")
ExternalData_Expand_Arguments(fooimg fooimg_loc
DATA{bin/foo.img}
)
ExternalData_Add_Target(fooimg)
~~~~

Now, I try combinations of values for ExternalData_URL_TEMPLATES and
ExternalData_OBJECT_STORES:

Not working:
~~~~
list(APPEND ExternalData_URL_TEMPLATES "\\\\share.host/foo/bar/%(algo)/%(hash)")
~~~~
The file is not found.

Working:
~~~~
list(APPEND ExternalData_URL_TEMPLATES "\\\\share.host/foo/bar/%(algo)/%(hash)")
list(APPEND ExternalData_OBJECT_STORES "r:/bar")
~~~~
The file is apparently found (at least there's no complaint) but then
taken from the store.

Not working:
~~~~
list(APPEND ExternalData_URL_TEMPLATES "\\\\share.host/foo/bar/%(algo)/%(hash)")
list(APPEND ExternalData_OBJECT_STORES "\\\\share.host/foo/bar")
~~~~
The file is not found.

Not working:
~~~~
list(APPEND ExternalData_OBJECT_STORES "r:/bar")
~~~~
Complains that ExternalData_URL_TEMPLATES is empty.

I was surprised to find that ExternalData_URL_TEMPLATES and
ExternalData_OBJECT_STORES weren't more independent and it's
disappointing to find that it isn't possible to use an UNC path to
download a data object.

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4
email: [email protected]   jabber: [email protected]
twitter: magthe               http://therning.org/magnus
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to