[CMake] install() and EXCLUDE_FROM_ALL issue ( patch review )

Alexander Neundorf a.neundorf-work at gmx.net
Thu Aug 2 13:26:24 EDT 2007


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


More information about the CMake mailing list