I am working with cmake as my building platform and am now looking for a way to make a custom target work in subdirectories. What I would like to achieve is to have a target, which generates coverage for us, that works at each subdirectory level
The structure:
root root/CMakeLists.txt (Coverage Target Declaration) root/Module1/ root/Module2/ root/Module3/
So if I go into root I can call make Coverage
, however if I do this in one of the module folders, it says make: *** No rule to make target `coverage'. Stop.
.
Is it possible to modify the root CMakeLists.txt file in such a way, that this particular target/command can be executed in each of the sub directories. So similar behaviour as the make test
.
Any help would be appriciated.
Thanks.