[CMake] Does SET_TARGET_PROPERTIES(foo PROPERTIES INSTALL_RPATH /path1; /path2) still silently ignore path2?
Dan Kegel
dank at kegel.com
Tue Aug 11 09:23:41 EDT 2015
Thanks. Should set_target_properties throw an error if given too many
arguments, to catch this problem?
Am 10.08.2015 11:43 nachm. schrieb "Nils Gladitz" <nilsgladitz at gmail.com>:
> On 08/11/2015 12:51 AM, Dan Kegel wrote:
>
>> With cmake 2.8.12.2,
>>
>> SET_TARGET_PROPERTIES (foo PROPERTIES INSTALL_RPATH ${my_install_rpath})
>>
>> silently only obeys the first directory in the rpath, but
>>
>> SET_TARGET_PROPERTIES (foo PROPERTIES INSTALL_RPATH "${my_install_rpath}")
>>
>> works. Is it still that way in the latest cmake, and is there
>> already a bug for this? I looked,
>> but didn't see one.
>>
>
> It should still be this way.
>
> The command takes any number of key value pairs where each key and value
> are a single argument.
>
> A CMake list when expanded unquoted results in one argument per list item.
>
> When a list is quoted it is a single argument.
>
> Expansion of variables happens before the command itself gets its
> arguments.
>
> Without the quotes the first item in my_install_rpath will be interpreted
> as a value while the second will be a key etc.
>
> It might therefor be more of a language rather than command specific issue.
>
> One clean alternative is to use set_property() instead since unlike
> set_target_properties() it takes a single key but any number of value
> arguments.
>
> Nils
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150811/337f5646/attachment.html>
More information about the CMake
mailing list