A bit of a guess, as you haven't included your CMakeLists.txt, but it appears that you're trying to add_dependencies(range ..) while there is no target range declared anywhere.