<br><br>
<div class="gmail_quote">2009/3/25 Alexander Neundorf <span dir="ltr"><<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Tuesday 24 March 2009, ankit jain wrote:<br>> hi all,<br>><br>> Iam doing the following through my cmakelist.txt<br>><br>> add_custom_target(mytarget)<br>> add_custom_command(TARGET mytarget POST_BUILD<br>
> COMMAND ${CMAKE_COMMAND} -E tar xvf ${CMAKE_CURRENT_SOURCE_DIR}/t1.tar)<br>> this cmakelist is written in subfolder of a mainfolder..<br>><br>> But the problem is that files are not extracted and it is not showing any<br>
> error.<br><br></div>Hm, I never tried to use add_custom_command(TARGET ... ) with a custom target.<br>So if you do "make mytarget" then tar is not executed ?<br>Did you try to do this directly using add_custom_target(), i.e. put the<br>
tar-command in the add_custom_target() ?<br><br>Alex</blockquote>
<div> </div>
<div>I followed this approach becoz add_cutom_command with outptu option deos not seems to work but actually i want to do it by that way only because from the main tree i issue make only so thats why that target will not build. </div>
<div> </div>
<div>Do anyone know what is the problem if i do like this and then run make:</div>
<div> </div>
<div>add_custom_command(OUTPUT {TARDIR}/t2 {TARDIR}/t3 <br>{TARDIR}/t1 <br>COMMAND tar ARGS -xvf $(TARDIR)/mytar.tar<br>WORKING_DIRECTORY ${TARDIR})</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span>Here i want to extract the files in the same folder where tar exists..</blockquote>
<div>the extraction will actually should give these t1, t2, t3 folder which i mention in output ..</div>
<div> </div>
<div>Is iam doing something wrong....</div>
<div> </div>
<div>Ankit</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><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></blockquote></div><br>