Re: [CMake] ExternalData on unmounted Windows shares?
sheepishlyIt does indeed work properly, once one uses the correct path in all places./sheepishly Sorry for the noise! /M On Fri, Nov 15, 2013 at 11:02 PM, Magnus Therning mag...@therning.org wrote: On Fri, Nov 15, 2013 at 04:45:23PM -0500, Brad King wrote: On 11/15/2013 04:17 PM, Magnus Therning wrote: I just reproduced it locally. Here's what I did: I tested with a local share and corresponding url template: file:127.0.0.1/share$/%(algo)/%(hash) It downloads at build time successfully for me. 4. Move the generated SHA file to C:\devo\shared$\SHA256\, in my case it became C:\devo\shared$\SHA26\9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc That should be SHA256, not SHA26. That was a typo in my email, it's SHA256 in the file system. -- Fetching file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/ExternalData.cmake:717 (message): Object SHA256=9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc not found at: file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc (couldn't read a file:// file) Is the mount available without any required credentials? Load it in explorer as \\127.0.0.1\shared$\SHA256 first to be sure. No credentials are required, but I found another typo in my CMakeLists.txt. Fixing that made it work for me too. I still need to check this a second time at work though. There the setup of shares is a bit more complicated (using MSDFS and such), it also does require credentials. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus If you can explain how you do something, then you're very very bad at it. -- John Hopfield -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org 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
Re: [CMake] ExternalData on unmounted Windows shares?
On 11/18/2013 08:01 AM, Magnus Therning wrote: It does indeed work properly, once one uses the correct path in all places. Great, thanks for reporting back! -Brad -- 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
Re: [CMake] ExternalData on unmounted Windows shares?
On Wed, Nov 13, 2013 at 10:26:53AM -0500, Brad King wrote: On 11/13/2013 03:59 AM, Magnus Therning wrote: On Tue, Nov 12, 2013 at 5:09 PM, Brad King brad.k...@kitware.com wrote: Add to ExternalData_URL_TEMPLATES the entry file:share.host/foo/bar/%(algo)/%(hash) That still fails on the real path I have to use in the project. Are there any known issues with hidden shares (name ending in $), or with paths containing spaces? The path that fails contains both :( I just tried network paths containing both spaces and a $ at the end or in the middle. It works just fine for me in either variable. I just reproduced it locally. Here's what I did: 1. Create a local share at C:\devo\shared$\ 2. Place the following in C:\devo\cmake_test\CMakeLists.txt: cmake_minimum_required(VERSION 2.8.12) project(cmake-test) include(ExternalData) set(ExternalData_LINK_CONTENT SHA256) set(ExternalData_URL_TEMPLATES file:127.0.0.1/shared$/%(algo)/%(hash)) ExternalData_Expand_Arguments(binfile binfilevar DATA{files/vc_web.exe} ) ExternalData_Add_Target(binfile) 3. Run configure in the CMake GUI tool with Source location: C:\devo\cmake_test Build location: C:\devo\cmake_test\_build 4. Move the generated SHA file to C:\devo\shared$\SHA256\, in my case it became C:\devo\shared$\SHA26\9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc 5. Generate for Visual Studio 2010 (all prior attempts have been with 2012 though so that ought to produce the same issue, but I don't have access to VS2012 at home) 6. Start Visual Studio with the generated solution and build 'binfile' The result I get then is: -- Build started: Project: ZERO_CHECK, Configuration: Debug Win32 -- -- Build started: Project: binfile, Configuration: Debug Win32 -- Generating C:/devo/cmake_test/_build/files/vc_web.exe -- Fetching file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/ExternalData.cmake:717 (message): Object SHA256=9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc not found at: file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc (couldn't read a file:// file) Call Stack (most recent call first): C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/ExternalData.cmake:739 (_ExternalData_download_object) C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: cmd.exe exited with code 1. == Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped == - It's not possible to set only ExternalData_OBJECT_STORES, one has to set ExternalData_URL_TEMPLATES too. Back when this module was part of another project and not ported to CMake upstream we did not have ExternalData_OBJECT_STORES and always used a store in the build tree. That is why ExternalData_URL_TEMPLATES is required to be set. When the ExternalData_OBJECT_STORES capability was created no one thought to lift the ExternalData_URL_TEMPLATES requirement because the projects using the module all set it anyway. It is easy enough to lift that restriction: ExternalData: Allow local stores without any URL templates http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8eb20eea Excellent, I hope that's slated for the next release then :) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. -- Alan Kay pgpK2dAaM1vH_.pgp Description: PGP signature -- 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
Re: [CMake] ExternalData on unmounted Windows shares?
On 11/15/2013 04:17 PM, Magnus Therning wrote: I just reproduced it locally. Here's what I did: I tested with a local share and corresponding url template: file:127.0.0.1/share$/%(algo)/%(hash) It downloads at build time successfully for me. 4. Move the generated SHA file to C:\devo\shared$\SHA256\, in my case it became C:\devo\shared$\SHA26\9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc That should be SHA256, not SHA26. -- Fetching file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/ExternalData.cmake:717 (message): Object SHA256=9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc not found at: file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc (couldn't read a file:// file) Is the mount available without any required credentials? Load it in explorer as \\127.0.0.1\shared$\SHA256 first to be sure. ExternalData: Allow local stores without any URL templates http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8eb20eea Excellent, I hope that's slated for the next release then :) It is. Meanwhile you can just put in a dummy URL template. -Brad -- 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
Re: [CMake] ExternalData on unmounted Windows shares?
On Fri, Nov 15, 2013 at 04:45:23PM -0500, Brad King wrote: On 11/15/2013 04:17 PM, Magnus Therning wrote: I just reproduced it locally. Here's what I did: I tested with a local share and corresponding url template: file:127.0.0.1/share$/%(algo)/%(hash) It downloads at build time successfully for me. 4. Move the generated SHA file to C:\devo\shared$\SHA256\, in my case it became C:\devo\shared$\SHA26\9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc That should be SHA256, not SHA26. That was a typo in my email, it's SHA256 in the file system. -- Fetching file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/ExternalData.cmake:717 (message): Object SHA256=9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc not found at: file:127.0.0.1/shared$/SHA256/9cf657b2a8e4a3deec1aa820dd60540d000bf1e6a5ae84920e93d698c293b2fc (couldn't read a file:// file) Is the mount available without any required credentials? Load it in explorer as \\127.0.0.1\shared$\SHA256 first to be sure. No credentials are required, but I found another typo in my CMakeLists.txt. Fixing that made it work for me too. I still need to check this a second time at work though. There the setup of shares is a bit more complicated (using MSDFS and such), it also does require credentials. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus If you can explain how you do something, then you're very very bad at it. -- John Hopfield pgpPah8bxa_fD.pgp Description: PGP signature -- 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
Re: [CMake] ExternalData on unmounted Windows shares?
On Tue, Nov 12, 2013 at 5:09 PM, Brad King brad.k...@kitware.com wrote: On 11/12/2013 08:43 AM, Magnus Therning wrote: Is there some way to point to an unmounted Windows share? Add to ExternalData_URL_TEMPLATES the entry file:share.host/foo/bar/%(algo)/%(hash) That still fails on the real path I have to use in the project. Are there any known issues with hidden shares (name ending in $), or with paths containing spaces? The path that fails contains both :( Since it is accessible through filesystem APIs you could also set ExternalData_OBJECT_STORES to c:/some/local/store;//share.host/foo/bar That tells ExternalData to use objects found in the local store or the network path directly without downloading. If an object is not found in either path, then the url templates will be searched for the object and it will be downloaded to the local store (first entry in ExternalData_OBJECT_STORES). That's what I was testing and wrote about in another response on this thread: - It's not possible to set only ExternalData_OBJECT_STORES, one has to set ExternalData_URL_TEMPLATES too. - I'd like to not have to map the drive (other users of the project would then have to free up a specific drive letter) and ExternalData_OBJECT_STORES don't seem to handle paths of the form //share.host/foo/bar. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org 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
Re: [CMake] ExternalData on unmounted Windows shares?
On 11/13/2013 03:59 AM, Magnus Therning wrote: On Tue, Nov 12, 2013 at 5:09 PM, Brad King brad.k...@kitware.com wrote: Add to ExternalData_URL_TEMPLATES the entry file:share.host/foo/bar/%(algo)/%(hash) That still fails on the real path I have to use in the project. Are there any known issues with hidden shares (name ending in $), or with paths containing spaces? The path that fails contains both :( I just tried network paths containing both spaces and a $ at the end or in the middle. It works just fine for me in either variable. - It's not possible to set only ExternalData_OBJECT_STORES, one has to set ExternalData_URL_TEMPLATES too. Back when this module was part of another project and not ported to CMake upstream we did not have ExternalData_OBJECT_STORES and always used a store in the build tree. That is why ExternalData_URL_TEMPLATES is required to be set. When the ExternalData_OBJECT_STORES capability was created no one thought to lift the ExternalData_URL_TEMPLATES requirement because the projects using the module all set it anyway. It is easy enough to lift that restriction: ExternalData: Allow local stores without any URL templates http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8eb20eea - I'd like to not have to map the drive (other users of the project would then have to free up a specific drive letter) and ExternalData_OBJECT_STORES don't seem to handle paths of the form //share.host/foo/bar. As I report above they work just fine for me. Please provide a sample CMakeLists.txt file and instructions for setting up a network share that demonstrates the failure. Include the error messages you expect us to see when reproducing it. What CMake build system generator (-G) are you using? -Brad -- 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
Re: [CMake] ExternalData on unmounted Windows shares?
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. -- Gruesse, Jakub -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Magnus Therning Sent: Dienstag, 12. November 2013 14:43 To: Cmake Mailing List Subject: [CMake] ExternalData on unmounted Windows shares? I'm trying to put some large-ish data files on a windows share and then reference them using the ExternalData module. I'm running into problems setting the ExternalData_URL_TEMPLATES properly. Neither smb://share.host/foo/bar/%(algo)/%(hash) nor //share.host/foo/bar/%(algo)/%(hash) work. For the former ExternalData reports unsupported protocol and for the latter URL using bad/illegal format or missing URL Is there some way to point to an unmounted Windows share? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org 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 -- 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
Re: [CMake] ExternalData on unmounted Windows shares?
On Tue, Nov 12, 2013 at 3:06 PM, Jakub Zakrzewski jzakrzew...@e2e.ch 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: mag...@therning.org jabber: mag...@therning.org 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
Re: [CMake] ExternalData on unmounted Windows shares?
On 11/12/2013 08:43 AM, Magnus Therning wrote: Is there some way to point to an unmounted Windows share? Add to ExternalData_URL_TEMPLATES the entry file:share.host/foo/bar/%(algo)/%(hash) Since it is accessible through filesystem APIs you could also set ExternalData_OBJECT_STORES to c:/some/local/store;//share.host/foo/bar That tells ExternalData to use objects found in the local store or the network path directly without downloading. If an object is not found in either path, then the url templates will be searched for the object and it will be downloaded to the local store (first entry in ExternalData_OBJECT_STORES). -Brad -- 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