[cmake-developers] generator expression for path slash conversion
Kislinskiy, Stefan
s.kislinskiy at Dkfz-Heidelberg.de
Thu Sep 17 09:51:06 EDT 2015
Sorry for the late answer, I was on vacation. I wrote a SHELL_PATH genex which uses cmOutputConverter->ConvertToOutputFormat(..., SHELL) for the conversion. I decided to name the genex SHELL_PATH instead of TO_SHELL_PATH for the sake of consistency to other genexes like LOWER_CASE. What do you think? If it is okay I would write some documentation as well of course.
- Stefan
-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com]
Sent: Montag, 31. August 2015 21:33
To: Kislinskiy, Stefan
Cc: CHEVRIER, Marc; cmake-developers at cmake.org; James Johnston
Subject: Re: [cmake-developers] generator expression for path slash conversion (was: ExternalProject: Use native paths as substitute for directory tokens)
On 08/31/2015 09:35 AM, Kislinskiy, Stefan wrote:
> As there is already a patch for such a genex in bug 15509 and the
> discussion in 5939 (both linked below in Brad's reply) started 7 years
> ago... It would be a great pity to let this issue seep away again.
> What can I do to help fixing this finally?
Someone will need to think through and propose a specific genex that does the path conversion that makes sense in this context. I think something like $<TO_SHELL_PATH:...> may be appropriate.
For referencing command line tools (as argv[0]) the C++ side uses code like this now:
this->ConvertToOutputFormat(ccg.GetCommand(i), SHELL)
This genex should map to the same conversion internally.
-Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shell_path_genex.patch
Type: application/octet-stream
Size: 2171 bytes
Desc: shell_path_genex.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150917/8a59b53f/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150917/8a59b53f/attachment.txt>
More information about the cmake-developers
mailing list