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.<br>
<br>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.<br><br>I've attached a small example of the problem I'm having. Not sure if this is a bug or just user error.<br clear="all">
<br>
lowman@locke:~/tmp/cmake_tests/CustomCommandProb/build$ make untar<br>
Scanning dependencies of target untar<br>
make[3]: *** No rule to make target `../foo-1.2.3', needed by `CMakeFiles/untar'. Stop.<br>
make[2]: *** [CMakeFiles/untar.dir/all] Error 2<br>
make[1]: *** [CMakeFiles/untar.dir/rule] Error 2<br>
make: *** [untar] Error 2<br><br>-- <br>Philip Lowman<br>