On 6/10/07, Jack Kelly <[EMAIL PROTECTED]> wrote:

Clark J. Wang wrote:
>     Clark J. Wang wrote:
>      > Another question:
>      >
>      > By default `make clean' does not know how to clean the 3rd-party
>      > package. How can I add another command which will be run by `make
>     clean'?
>      >

Have you tried:

ADD_CUSTOM_COMMAND(
   TARGET clean
   POST_BUILD
   COMMAND make
   ARGS clean
   WORKING_DIR dir
   VERBATIM
)

? I haven't, but it looks like it _should_ work.


It does not work :-(
Actually cmake does not view `all' or `clean' as targets. Take the following
CMakeLists.txt as an example:

ADD_CUSTOM_TARGET(
   hello
   COMMAND echo hello world
)
ADD_DEPENDENCIES(all hello)

When running cmake it will report error: "ADD_DEPENDENCIES Adding dependency
to non-existent target: all".

-- Jack
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to