I'm used to defining CMake target dependencies using the target_link_libraries()
command. Recently, though, I've noticed the existence of another command, add_dependencies()
. When should I use the latter rather than the former?
Note: I tried reading this question: target_link_libraries and add_dependencies - but the answers confused me. I understand I should not use both. But it's not entirely clear to me when I should use which.