[CMake] install() and EXCLUDE_FROM_ALL issue ( patch review )
Alexandru Ciobanu
aciobanu at matrox.com
Thu Aug 2 13:37:28 EDT 2007
Hi, Alex!
You are right. The patch does not do the right thing.
I just observed that it also completely removes the
preinstall rule for excluded directories.
So make install insde those dirs will fail because there
is no preinstall.
Alex
Alexander Neundorf wrote:
> On Thursday 02 August 2007 13:01, Alexandru Ciobanu wrote:
>
>> Hi!
>>
>> I was able to find and correct the problem.
>> I have used the 2.4.7 release sources.
>>
>> Here is the trivial patch ( also attached):
>> --- cmake-2.4.7/Source/cmGlobalUnixMakefileGenerator3.cxx
>> 2007-07-16 17:12:31.000000000 -0400
>> +++ cmake-2.4.7-x/Source/cmGlobalUnixMakefileGenerator3.cxx
>> 2007-08-02 12:36:52.000000000 -0400
>> @@ -850,7 +850,7 @@
>> t->second.GetName(), depends, commands, true);
>>
>> // Add rules to prepare the target for installation.
>> - if(t->second.NeedRelinkBeforeInstall())
>> + if(!exclude && t->second.NeedRelinkBeforeInstall())
>> {
>> localName = lg->GetRelativeTargetDirectory(t->second);
>> localName += "/preinstall";
>>
>>
>> This will prevent the addition of the preinstall rule for EXCLUDED_FROM_ALL
>> directories.
>>
>
> I guess the EXCLUDE_FROM_ALL targets will then also not be relinked if they
> are installed, right ?
>
> Maybe for EXCLUDE_FROM_ALL targets the relinking should happen when the target
> gets built, not when it's installed ?
>
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
More information about the CMake
mailing list