Hello<br><br>I am using cmake 2.8 to generate Visual Studio 2010 solution files. <br><br>I have the following cmakelists.txt :<br><br>set(PROJECT_NAME Test2)<br>PROJECT(${PROJECT_NAME})<br><br>FILE(GLOB Test_SRCS <br> main.cpp<br>
  )<br><br><br>ADD_EXECUTABLE(${PROJECT_NAME} <br>  ${Test_SRCS} <br>)<br><br><br>ADD_CUSTOM_COMMAND (OUTPUT &quot;$(ConfigurationName)/Foo.txt&quot;<br>       COMMAND echo Foo &gt;  &quot;$(ConfigurationName)/Foo.txt&quot;<br>
       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/myfile.txt<br>)<br> ADD_CUSTOM_TARGET (Foo DEPENDS &quot;$(ConfigurationName)/Foo.txt&quot;)<br> ADD_DEPENDENCIES(${PROJECT_NAME} Foo)<br><br>The problem is that Foo.txt is generated on every build on the solution although myfile.txt is not changed. <br>
<br><br><br><br><br><h3 class="r"><br></h3>