[cmake-developers] ExternalProject and git clone

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Wed Sep 11 10:39:26 EDT 2013


On 11/09/13 14:34, Brad King wrote:
> On 09/11/2013 06:00 AM, Daniele E. Domenichelli wrote:
>> On 10/09/13 20:05, Brad King wrote:
>>> I think it should be explicitly enabled or disabled by an option:
>>>
>>>  GIT_WORK_TREE_PRESERVE <0|1>
>>
>> What about EP_WORK_TREE_PRESERVE? Even though the patch is for git only
>> at the moment, I think this should be supported also for the other
>> repositories (perhaps just failing if there are no equivalent commands
>> to make the checks)
> 
> The EP_ prefix is not needed because this is already an option of
> the ExternalProject_Add function.  How about SOURCE_DIR_PRESERVE?

Ah ok, sorry I thought this was supposed to be a global variable, not a
parameter of ExternalProject_Add...
So, how about a SOURCE_DIR_PRESERVE parameter of ExternalProject_Add
that defaults to the value of EP_SOURCE_DIR_PRESERVE if defined, or to
TRUE if (The work tree is outside CMAKE_BINARY_DIR) AND (NOT
CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.13)?


 Daniele



More information about the cmake-developers mailing list