cmake and RPATH
Brad King
brad.king at kitware.com
Wed Mar 1 22:15:51 CET 2006
David Faure wrote:
> On Wednesday 01 March 2006 19:55, Brad King wrote:
>
>>option(KDE4_BUILD_FOR_DEVELOPER "Enable running from build tree." OFF)
>>if(NOT KDE4_BUILD_FOR_DEVELOPER)
>> set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
>>endif(NOT KDE4_BUILD_FOR_DEVELOPER)
>>
>>then users who build and install KDE will not have to do anything
>>special and the installed binaries will have the proper install-tree
>>rpath. Developers who wish to have the option of running from the build
>>tree may enable this option at the expense of requiring the automatic
>>relinking before installation.
>
> This means if I want to be able to run unit tests, my "make install" will
> be slow as hell? This doesn't sound good :(
>
> Unit tests are programs which -always- run from the build tree (and only from there).
> Maybe we need a way to flag "those programs should have builddir-rpaths"
> even when the above option is set?
For unit test executables one can use set_target_properties to override
the global variable setting and given them an rpath in the build tree.
Since the executables have no install rules CMake will not create any
relinking rules for them.
-Brad
More information about the Kde-buildsystem
mailing list