Hello<br><br>>>Can you create a VS project manually through the IDE in which<br>
>>this works correctly?<br><br>I add custom build step manually through VS10 dialog for the following cmake code , and it works as it should. But if I run this through cmake ( not manually ) it does not work:<br><br>
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)<br>
PROJECT(quick_test)<br>
<br>
ADD_CUSTOM_COMMAND(<br>
OUTPUT generated.txt<br>
<div class="im"> COMMAND ${CMAKE_COMMAND} -E copy<br>
${PROJECT_SOURCE_DIR}/<a href="http://generated.txt.in/" target="_blank">generated.txt.in</a><br>
${PROJECT_BINARY_DIR}/generated.txt<br>
</div> DEPENDS <a href="http://generated.txt.in/" target="_blank">generated.txt.in</a><br>
)<br>ADD_CUSTOM_TARGET(${PROJECT_NAME} DEPENDS generated.txt)<br><br>What it seems odd is this : <br>If I change the name of the input file or the name od the output file , then it does work with cmake too.<br><br>Maybe this just my imagination can not tell for sure. My guess is maybe this has to do something that the output file ( generated.txt) is substring of the input file ( <a href="http://generated.txt.in">generated.txt.in</a> ). <br>
<br>Thank you<br><br><br><br>
<br>
<br><br><div class="gmail_quote">On Wed, Apr 28, 2010 at 6:52 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>></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;">
<div class="im">elizabeta petreska wrote:<br>
> I am using Visual Studio 2010 generator and cmake 2.8.1<br>
> The example code you show, does work with Visual Studio 2005 generator<br>
> and visual studio 2008 generator , but does not work with Visual Studio<br>
> 2010 generator, i.e<br>
> If I touch the ${PROJECT_BINARY_DIR}/generated.txt, the target is not<br>
> built anew.<br>
<br>
</div>Can you create a VS project manually through the IDE in which<br>
this works correctly?<br>
<font color="#888888"><br>
-Brad<br>
</font></blockquote></div><br>