cmake install_files target has changed behavior in a dangerous way.

Thomas Zander zander at kde.org
Tue Jul 4 19:01:01 BST 2006


After some talk on IRC Laurant and me seem to not be able to get over a 
difference in opinion about one thing; and I want to put the issue to a 
wider audience to get more input.

In cmake files last week you can see targets like these:
  install_files( /include FILES foo.h)
This has to change to
  install(FILES foo.h DESTINATION include)
so far so good.

The problem comes when you used /include (including that slash) in the new 
version. As the install target defaults to absolute paths. So I really do 
install to /include    Not to $prefix/include
This changes the concept of "install everything in $prefix"
to "install everything anywhere in the system; you are responsible for 
keeping the prefix".

This alone makes me scared; in former versions mistyping a path could not 
damage your machine outside of the prefix. It took effort to do anything 
outside the prefix.  This makes sense to me; make the correct easy and 
the complex possible.

Laurant is very adamant in stating that if I forget the variable for the 
prefix in that install dir; then what cmake does is correct, so I'm to 
blame for the mess that this will create all over my system (remember, 
95% of the people still install as root).
I disagree; taking away the basic concept of everything is in the prefix 
makes things fragile and a check in koffice/libs shows that in some 30 
cases other authors agreed with my assumption.

How do others feel about this?  Should the buildfile writers be more 
knowledgable, or should damaging your system be hard ?
-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060704/24a0fe94/attachment.sig>


More information about the kde-core-devel mailing list