The final args to set_target_properties are any number of name/value pairs:<div><br></div><div><a href="http://www.cmake.org/cmake/help/v3.3/command/set_target_properties.html">http://www.cmake.org/cmake/help/v3.3/command/set_target_properties.html</a></div><div><br></div><div>The only thing we could do there is look for an even number of args, and catch possible problems half the time... I'm not sure if there are any restrictions on property names, but for this command, and its historical args composition, we are stuck with "prop1 value1 prop2 value2 ..." as the final args.</div><div><br></div>Having said all that, there are some checks on the args to the function, so it looks like you got "unlucky" with the number of paths in the prop value. I would advise against playing roulette for a while... ;-)<div><br></div><div><a href="https://github.com/Kitware/CMake/blob/422d3f68/Source/cmSetTargetPropertiesCommand.cxx#L36-L40">https://github.com/Kitware/CMake/blob/422d3f68/Source/cmSetTargetPropertiesCommand.cxx#L36-L40</a></div><div><br><div><br></div><div>HTH,</div><div>David C.</div><div><br><br>On Tuesday, August 11, 2015, Dan Kegel <<a href="mailto:dank@kegel.com">dank@kegel.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thanks.  Should set_target_properties throw an error if given too many arguments, to catch this problem?</p>
<div class="gmail_quote">Am 10.08.2015 11:43 nachm. schrieb "Nils Gladitz" <<a href="javascript:_e(%7B%7D,'cvml','nilsgladitz@gmail.com');" target="_blank">nilsgladitz@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/11/2015 12:51 AM, Dan Kegel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With cmake 2.8.12.2,<br>
<br>
SET_TARGET_PROPERTIES (foo PROPERTIES INSTALL_RPATH ${my_install_rpath})<br>
<br>
silently only obeys the first directory in the rpath, but<br>
<br>
SET_TARGET_PROPERTIES (foo PROPERTIES INSTALL_RPATH "${my_install_rpath}")<br>
<br>
works.  Is it still that way in the latest cmake, and is there<br>
already a bug for this?  I looked,<br>
but didn't see one.<br>
</blockquote>
<br>
It should still be this way.<br>
<br>
The command takes any number of key value pairs where each key and value are a single argument.<br>
<br>
A CMake list when expanded unquoted results in one argument per list item.<br>
<br>
When a list is quoted it is a single argument.<br>
<br>
Expansion of variables happens before the command itself gets its arguments.<br>
<br>
Without the quotes the first item in my_install_rpath will be interpreted as a value while the second will be a key etc.<br>
<br>
It might therefor be more of a language rather than command specific issue.<br>
<br>
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.<br>
<br>
Nils<br>
</blockquote></div>
</blockquote></div></div>