No rule to make custom target
- by Andy T
add_custom_target(custom_target
COMMAND ./some_script.sh
WORKING_DIRECTORY subdir
)
I cannot build this custom target because of error:
make[4]: *** No rule to make target `subdir/all'. Stop.
make[3]: *** [all] Error 2
make[2]: *** [project_dir/CMakeFiles/custom_target] Error 2
make[1]: *** [project_dir/CMakeFiles/custom_target.dir/all] Error 2
make: *** [all] Error 2
How to resolve this?