Sorry, I misread the error message.<br><br>A GLOBAL property is simply at global scope and does not require a &quot;target name&quot; like a target property does.<br><br><br><div class="gmail_quote">On Fri, Jan 7, 2011 at 7:32 AM, David Cole <span dir="ltr">&lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">set_property(GLOBAL requires CMake 2.8 or later.<div><div></div><div class="h5"><br><br><br>
<div class="gmail_quote">On Fri, Jan 7, 2011 at 7:08 AM, Martin Magnusson <span dir="ltr">&lt;<a href="mailto:martin@eyra.se" target="_blank">martin@eyra.se</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">2011-01-07 12:07, Nizar Khalifa Sallem skrev:<br>
<div>&gt; At Fri, 07 Jan 2011 11:11:18 +0100,<br>
&gt; Martin Magnusson wrote:<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m having trouble setting the runtime output directory, especially with<br>
&gt;&gt; multiple configurations.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m using CMake 2.8 on Ubuntu 10.04, with gcc.<br>
&gt;&gt;<br>
&gt;&gt; My current root CMakeLists.txt contains<br>
&gt;&gt; SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )<br>
&gt;&gt; which works, although the EXECUTABLE_OUTPUT_PATH is deprecated.<br>
&gt;&gt;<br>
&gt;&gt; If I read the documentation correctly, the proper way of setting the<br>
&gt;&gt; output directory now would be<br>
&gt;&gt; SET_PROPERTY( GLOBAL PROPERTY<br>
&gt;&gt;   RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin<br>
&gt;&gt; )<br>
&gt;&gt; but that doesn&#39;t work for me. With that setting, the binary is produced<br>
&gt;&gt; in the source directory, just as if I hadn&#39;t specified an output<br>
&gt;&gt; directory at all.<br>
</div><div>&gt; Hi,<br>
&gt; Actually you can do something like this:<br>
&gt; set_property(GLOBAL TARGET target1, target2, ...<br>
&gt; PROPERTY RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO<br>
&gt; ${PROJECT_BINARY_DIR}/bin/relwithdebinfo)<br>
<br>
</div>I tried that just now, but then CMake exits with the message<br>
<br>
CMake Error at CMakeLists.txt:8 (SET_PROPERTY):<br>
  set_property given names for GLOBAL scope.<br>
<div><div></div><div><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>