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

Kislinskiy, Stefan s.kislinskiy at Dkfz-Heidelberg.de
Thu Aug 27 09:43:35 EDT 2015


This is pretty nice from the perspective of an engineer. But I wonder if it wouldn't be kind of over-engineered in the sense that it would be a rather hidden feature for the purpose? -- I probably wouldn't think of searching for a generator expression in the documentation when I have trouble with the replacement of directory tokens. Then again, there could be a hint in the ExternalProject documentation which would be fine I guess. One way or another, I would be happy if we could determine what the patch should provide exactly so that we come to an end. :-) Thank you for all the feedback so far.  


-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Donnerstag, 27. August 2015 15:10
To: Kislinskiy, Stefan; CHEVRIER, Marc; David Cole
Cc: cmake-developers at cmake.org
Subject: Re: [cmake-developers] ExternalProject: Use native paths as substitute for directory tokens

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