Yes, there is a limitation. You can&#39;t use them in OUTPUT. See <a href="http://public.kitware.com/Bug/view.php?id=12877">http://public.kitware.com/Bug/view.php?id=12877</a><br><br>Petr<br><br><div class="gmail_quote">On Wed, Nov 7, 2012 at 12:26 AM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was specifying that in my path for one of the OUTPUT files in<br>
add_custom_command(). Is there any limitation on where/how it can be<br>
used in a custom command?<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Nov 6, 2012 at 2:41 PM, David Cole &lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt; wrote:<br>
&gt; The multi-configuration generators do understand CMAKE_CFG_INTDIR.<br>
&gt;<br>
&gt; CMake generates code to call your custom command, including $(OutDir)<br>
&gt; wherever you reference ${CMAKE_CFG_INTDIR}, and then Visual Studio<br>
&gt; sets that before invoking your command so that it gets resolved to the<br>
&gt; correct configuration-specific string.<br>
&gt;<br>
&gt; Are you seeing your command called with the literal $(OutDir) from<br>
&gt; Visual Studio? It should already be substituted for you by the time<br>
&gt; you see it in your command&#39;s argument parsing.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 6, 2012 at 3:31 PM, Robert Dailey &lt;<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>&gt; wrote:<br>
&gt;&gt; On second thought, CMAKE_CFG_INTDIR won&#39;t work for multi-configuration<br>
&gt;&gt; generators. It is using $(OutDir) for Visual Studio 2008 generator,<br>
&gt;&gt; which my custom command can&#39;t understand. I&#39;d like to use<br>
&gt;&gt; $&lt;CONFIGURATION&gt; but then it won&#39;t work for single-configuration<br>
&gt;&gt; generators (like NMake) where I want it to be &quot;.&quot; only.<br>
&gt;&gt;<br>
&gt;&gt; Any ideas?<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Nov 5, 2012 at 5:45 PM, Robert Dailey &lt;<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; Sorry I got confused, what I needed to use is CMAKE_CFG_INTDIR.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mon, Nov 5, 2012 at 5:17 PM, Robert Dailey &lt;<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; I&#39;m using a custom target to copy files to the following directory:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$&lt;CONFIGURATION&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; This works on Visual Studio generators, because binaries that are<br>
&gt;&gt;&gt;&gt; compiled are placed in the directory above.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; However, if I generate for NMake on Windows, binaries are placed in<br>
&gt;&gt;&gt;&gt; ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} instead, but $&lt;CONFIGURATION&gt; for<br>
&gt;&gt;&gt;&gt; the NMake makefiles generator says &quot;Debug&quot; instead of just &quot;.&quot; so my<br>
&gt;&gt;&gt;&gt; files do not copy to the correct location.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Can anyone explain this? Am I doing something wrong? How can I make my<br>
&gt;&gt;&gt;&gt; files copy to the appropriate binary output directory on both<br>
&gt;&gt;&gt;&gt; generators?<br>
&gt;&gt; --<br>
&gt;&gt;<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; 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>
&gt;&gt;<br>
&gt;&gt; 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>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
--<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>