On 01/14/2014 11:47 AM, Daniele E. Domenichelli wrote: > Updated the topic to behave in this way. Can you please review it again?
Please update the comment introducing __LAST_LIBDIR_DEFAULT to explain that it is the default we compute from __LAST_CMAKE_INSTALL_PREFIX, not a cache entry for the value that was last used as the default. This line: + if(DEFINED ${__LAST_CMAKE_INSTALL_PREFIX}) should not have the ${}, right? In this line: +set(__LAST_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "CMAKE_INSTALL_PREFIX during last run" FORCE) you don't need FORCE for INTERNAL cache entries. Since the user cannot edit them anyway the set() command always forces the value. There is one issue I neglected to raise last time around. One of the design features of the current GNUInstallDirs implementation is that all the cache entries are created inside "if(NOT DEFINED ...)" guards. This allows projects to set the values as normal variables before including GNUInstallDirs to avoid having the entries cached or user- editable. In order to preserve this feature you'll need to use get_property(CACHE) when CMAKE_INSTALL_LIBDIR is defined to make sure it is actually a cache entry before updating it. If it is a plain variable then we should trust that the project intentionally set it as desired. Thanks, -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers