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

Brad King brad.king at kitware.com
Mon Jan 13 10:51:45 EST 2014


On 01/13/2014 10:23 AM, Daniele E. Domenichelli wrote:
> Can I store CMAKE_INSTALL_PREFIX in an internal cached variable, check
> if it was changed since last run (i.e. CMAKE_INSTALL_PREFIX_OLD !=
> CMAKE_INSTALL_PREFIX), check if the value is the default one, and
> eventually force-set it to the new default?

Yes, that should work.  Call it something internal-sounding
like __LAST_CMAKE_INSTALL_PREFIX.

FYI, instead of FORCE you can use the set_property command:

 set_property(CACHE <var> PROPERTY VALUE <forced-value>)

-Brad




More information about the cmake-developers mailing list