I'm trying to come up with a way to have a custom target defined in the
top-level directory execute a collection of custom commands previously
defined in subdirectories throughout the code (to untar many tarballs).
Unfortunately, the approach I'm trying isn't working.

When I invoke add_custom_target() immediately after add_custom_command() in
the same directory, it works fine.  When I invoke add_custom_target() in the
parent directory it causes an error in the makefiles.

I've attached a small example of the problem I'm having.  Not sure if this
is a bug or just user error.

low...@locke:~/tmp/cmake_tests/CustomCommandProb/build$ make untar
Scanning dependencies of target untar
make[3]: *** No rule to make target `../foo-1.2.3', needed by
`CMakeFiles/untar'.  Stop.
make[2]: *** [CMakeFiles/untar.dir/all] Error 2
make[1]: *** [CMakeFiles/untar.dir/rule] Error 2
make: *** [untar] Error 2

-- 
Philip Lowman

Attachment: CustomCommandProb.tar.gz
Description: GNU Zip compressed data

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to