[cmake-developers] Splitting roles of CMAKE_INSTALL_PREFIX
Stephen Kelly
steveire at gmail.com
Thu Jul 11 09:06:14 EDT 2013
Brad King wrote:
> Both roles are already widely used. There is user code that:
>
> * Sets CMAKE_INSTALL_PREFIX to change the install dest (role 1).
> * Uses CMAKE_INSTALL_PREFIX as the target install dest (role 2).
>
> Moving one role into a separate variable will require user code for
> at least one of the two roles to be updated to support the case
> when the values are different. Role 2 is probably more common.
In cmake code you mean? I imagine there are lots of bash scripts or aliases
which invoke cmake with -DCMAKE_INSTALL_PREFIX (I use an alias).
> We've split variables like this before. When cross compiling was
> first added CMAKE_SYSTEM_NAME was kept as the target and a new
> CMAKE_HOST_SYSTEM_NAME variable was added for the host. For
> consistency with that approach perhaps your proposed variable
> CMAKE_HOST_INSTALL_PREFIX could take over role 1 when set.
>
> Thoughts?
I think CMAKE_EXTERNAL_INSTALL_PREFIX would be a better name.
I'd prefer the ability to make CMAKE_HOST_INSTALL_PREFIX mean 'the location
to install host tools when doing a HOST+TARGET build' in the future.
Thanks,
Steve.
More information about the cmake-developers
mailing list