[cmake-developers] Modifying RPATH feature to run tests uninstalled

Brad King brad.king at kitware.com
Fri Feb 17 09:36:16 EST 2012


On 2/17/2012 9:31 AM, Alexander Neundorf wrote:
> Yes, but this could be done already right now.
> We (KDE) could add an option(), which when enabled sets CMAKE_INSTALL_RPATH
> empty, and CMAKE_INSTALL_RPATH_USE_LINK_PATH to FALSE. This would be the same
> effect.
>
> CMAKE_SKIP_RPATH is intentionally for people who just want to disable RPATH no
> matter what the project does.
>
> ...maybe we (KDE) could do:
>
> if(CMAKE_SKIP_RPATH)
>    set(CMAKE_SKIP_RPATH FALSE)
>    set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
>    set(CMAKE_INSTALL_RPATH "")
> endif()

As I said in parallel to your response I'd prefer that distros
use a hammer like CMAKE_SKIP_INSTALL_RPATH so they do not have
to depend on the project supporting it with code like the above.
I'd like to discourage them from using CMAKE_SKIP_RPATH because
it is a pain for testing.

Of course your approach doesn't depend on any new CMake changes
so you can use it right now to get started.

-Brad



More information about the cmake-developers mailing list