[cmake-developers] ExternalProject: Use native paths as substitute for directory tokens

Brad King brad.king at kitware.com
Thu Aug 27 09:10:04 EDT 2015


On 08/26/2015 03:35 AM, Kislinskiy, Stefan wrote:
> Would you prefer to have a switch for each *_DIR variable for all
> target steps, or a common switch but for each target step, like
> the new USE_TERMINAL switches in the master?
[snip]
> Von: CHEVRIER, Marc [marc.chevrier at sap.com]
> Offering the possibility to manage native paths in an easy way
> is a very good enhancement

Another approach is to introduce a generator expression to transform
the path slash style.  Then it could be used both for ExternalProject
and in other custom commands.  E.g.

 $<PATH_FOR_SHELL:<SOURCE_DIR>/bootstrap${shell_ext}>

In this case <SOURCE_DIR> would be replaced with forward slashes
by ExternalProject but then at generate time CMake would evaluate
the genex to convert slashes as needed.

-Brad



More information about the cmake-developers mailing list