<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br>&nbsp; shown below is a simplified and relevant part of my CMakeLists.txt file.<br><br>add_custom_command (<br>&nbsp; OUTPUT&nbsp; ${CMAKE_CURRENT_BINARY_DIR}/sample.bash<br>&nbsp; DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sample.bash<br>&nbsp; COMMAND cp ARGS -f&nbsp; ${CMAKE_CURRENT_SOURCE_DIR}/sample.bash .)<br><br>add_custom_target (sample.bash ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sample.bash)<br><br>&nbsp; Basically, I want to copy the 'sample.bash' script from source directory to the<br>binary (build) directory when 'make' is run.<br>I want this CMakeLists.txt to work on cmake version 2.4 as well as 2.6<br><br>On cmake 2.4, this works fine.<br>mladhe@linux:~/cmake_expt/bld] make<br>[&nbsp; 0%] Generating sample.bash<br>[100%] Built target sample.bash<br>mladhe@linux45:~/cmake_expt/bld] ls<br>CMakeCache.txt&nbsp; CMakeFiles&nbsp; Makefile&nbsp;
 cmake_install.cmake&nbsp; <span style="font-weight: bold;">sample.bash</span><br><br>However on cmake 2.6, I get the following.<br><br>mladhe@linux:~/cmake_expt/bld] make<br>Scanning dependencies of target sample.bash<br>make[2]: Circular CMakeFiles/sample.bash &lt;- sample.bash dependency dropped.<br>Built target sample.bash<br>mladhe@linux45:~/cmake_expt/bld] ls<br>CMakeCache.txt&nbsp; CMakeFiles&nbsp; Makefile&nbsp; cmake_install.cmake<br><br>As can be seen, sample.bash file has not been copied.<br><br>How to make this CMakeLists.txt work on both cmake versions ?<br><br>Thank you,<br>Regards,<br>Mahendra Ladhe<br><br><br></td></tr></table><br>



      <!--1--><hr size=1></hr> 
The INTERNET now has a personality. YOURS! <a href="http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/" target="_blank">See your Yahoo! Homepage</a>.