|
|
@@ -35,10 +35,14 @@ bool cmAddDependenciesCommand
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- std::string error = "Adding dependency to non-existent target: ";
|
|
|
- error += target_name;
|
|
|
- this->SetError(error.c_str());
|
|
|
- return false;
|
|
|
+ cmOStringStream e;
|
|
|
+ e << "Cannot add target-level dependencies to non-existent target \""
|
|
|
+ << target_name << "\".\n"
|
|
|
+ << "The add_dependencies works for top-level logical targets created "
|
|
|
+ << "by the add_executable, add_library, or add_custom_target commands. "
|
|
|
+ << "If you want to add file-level dependencies see the DEPENDS option "
|
|
|
+ << "of the add_custom_target and add_custom_command commands.";
|
|
|
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
|
|
}
|
|
|
|
|
|
return true;
|