[cmake-developers] Modifying RPATH feature to run tests uninstalled
Stephen Kelly
steveire at gmail.com
Sun Feb 19 18:38:51 EST 2012
Brad King wrote:
> On 2/17/2012 9:13 AM, Stephen Kelly wrote:
>> If CMAKE_SKIP_INSTALL_RPATH is used by our buildsystems and
>> CMAKE_SKIP_RPATH is not, distros will learn that they can run unit tests
>> if they build their packages with the former instead of the latter.
>>
>> From my point of view though, the ENVIRONMENT property manipulation
>> solves
>> enough of the problem already. It makes 'make test' work.
>>
>> What it doesn't fix is running a unit test executable directly without
>> setting the environment manually or running make install. I don't see why
>> that should be expected to work though if the developer disables the
>> RPATH stuff. It also doesn't work currently (without wrapper scripts), so
>> nothing is really lost.
>>
>> However, adding CMAKE_SKIP_INSTALL_RPATH would make that work even if a
>> developer wanted to disable RPATH, so maybe it's a nice thing to do.
>
> This is achievable by project code if it never sets INSTALL_RPATH.
> However it can be convenient for distros to have a "hammer" like
> CMAKE_SKIP_INSTALL_RPATH to avoid patching uncooperative projects.
>
> Distros are using CMAKE_SKIP_RPATH as that hammer now, and it's a
> pain for tests. I think CMAKE_SKIP_INSTALL_RPATH is the right
> balance. It allows tests to run and distros to avoid RPATH in
> their packages.
I have also added a skip-install-rpath branch to my clone for review.
So far it's a quick hack. I'm not sure if I'm barking up the right or wrong
tree.
Thanks,
Steve.
More information about the cmake-developers
mailing list