[CMake] problem with add_custom command
Alexander Neundorf
a.neundorf-work at gmx.net
Tue Mar 24 16:31:50 EDT 2009
On Tuesday 24 March 2009, ankit jain wrote:
> 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.
Hm, I never tried to use add_custom_command(TARGET ... ) with a custom target.
So if you do "make mytarget" then tar is not executed ?
Did you try to do this directly using add_custom_target(), i.e. put the
tar-command in the add_custom_target() ?
Alex
More information about the CMake
mailing list