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

Alexandru Ciobanu aciobanu at matrox.com
Thu Aug 2 13:01:04 EDT 2007


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've tested it for all my projects. But it obviously needs to be 
overseen by others.

Alex Ciobanu

PS: I now understand what the bug 3100 fix was all about. The author 
fixed the
problem for the cmake_install.cmake file, which was probably enough in 
2.2.3.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: inst_exclude_from_all.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20070802/0866ece6/inst_exclude_from_all.bin


More information about the CMake mailing list