suppose Makefile having a phony target like this
.PHONY : run_my_command
- - - - - - - - - -
- - - - - - - - - -
we can directly run only this .phony target in Makefile from command line by giving the below command
make -f Makefile run_my_command
I want to do the same thing with CMakeList. How to tell cmake to create a phony target with the name i give?
Note: I dont want to run this phony target everytime i run make. Instead i want to run it manually when required. I know that add_custom_target() will generate phony target and with the help of add_dependency() we can attach the phony target to the target. But my requirement is different. I want to run this phony target manually when required.