[cmake-developers] generator expression for path slash conversion

Brad King brad.king at kitware.com
Thu Sep 17 09:55:51 EDT 2015


On 09/17/2015 09:51 AM, Kislinskiy, Stefan wrote:
> 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?

LGTM.

> I would write some documentation as well of course.

Yes, please.  Also please look at extending the test suite to cover it.
See Tests/GeneratorExpression for genex unit test examples.  If possible
we should also have a case that uses it in practice in a way that fails
on invocation of an actual native tool if the slashes are wrong.  That
will confirm not only that the genex does what we expect but that it
also solves the problem we're trying to solve.

Thanks,
-Brad



More information about the cmake-developers mailing list