[CMake] problem with add_custom command

ankit jain ankitguddu at gmail.com
Tue Mar 24 02:31:38 EDT 2009


hi all,

Iam doing the following through my cmakelist.txt

add_custom_target(mytarget)
add_custom_command(TARGET mytarget POST_BUILD
COMMAND ${CMAKE_COMMAND} -E tar xvf ${CMAKE_CURRENT_SOURCE_DIR}/t1.tar)
this cmakelist is written in subfolder of a mainfolder..

But the problem is that files are not extracted and it is not showing any
error.

Is iam doing something wrong..


Same problem with other where iam extracting jar files
add_custm_target(mytarget1)

add_custom_command(TARGET mytarget1 POST_BUILD
COMMAND jar ARGS -xf $(XERCESDIR)/xmlParserAPIs.jar
WORKING_DIRECTORY ${XERCESDIR})

here i want to extract the files in the smae directory whrer the jar exists.

is iam doing something wrong here too..

add_custom_command with output option doesnot seems to work thats why i go
with this approach

ANy suggestion in this regards will be of great help to me...


ankit


Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090324/5f6c7dc3/attachment.htm>


More information about the CMake mailing list