[CMake] Recursive custom target
Piotr Jaroszyński
p.jaroszynski at gmail.com
Thu Jul 31 15:07:34 EDT 2008
>> is it possible to add a custom target so that it would be visible in
>> all the subdirectories?
>
> My experience is that targets are actually available in all directories.
$ mkdir /tmp/test
$ cd /tmp/test
$ echo "add_custom_target(bar)" > CMakeLists.txt
$ echo "add_subdirectory(foo)" >> CMakeLists.txt
$ mkdir foo
$ cmake .
$ make bar
Built target bar
$ cd foo && make bar
make: *** No rule to make target `bar'. Stop.
$ cmake --version
cmake version 2.4-patch 8
--
Best Regards,
Piotr Jaroszyński
More information about the CMake
mailing list