[cmake-developers] RFC/Review Request: Topic GNUInstallDirs_debian-multiarch-fix

Brad King brad.king at kitware.com
Mon Jan 13 09:34:20 EST 2014


On 01/13/2014 03:45 AM, Daniele E. Domenichelli wrote:
> Please review the topic GNUInstallDirs_debian-multiarch-fix
> GNUInstallDirs: Fix CMAKE_INSTALL_LIBDIR on Debian

This looks like a good fix but some details need adjustment.

This hunk:

-if(NOT DEFINED CMAKE_INSTALL_LIBDIR)

removes the guard that avoids doing all the default-computing
logic when there is already a value.  In this hunk:

+set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})" FORCE)

one should not FORCE the cache entry.  Otherwise there is no way
for the local users to change the setting for their build trees.

Both of the above are incorrect and seem unrelated to the proposed
change.

In this hunk:

+    if (${CMAKE_INSTALL_PREFIX} MATCHES "^/usr/?$")

the left side should be quoted or just the plain variable name
to ensure it works when the prefix value is an empty string.

Thanks,
-Brad




More information about the cmake-developers mailing list