ENH: add error checking

This commit is contained in:
Bill Hoffman 2001-12-27 13:55:05 -05:00
parent 3d24bc75bd
commit 445f122a92
1 changed files with 16 additions and 0 deletions

View File

@ -66,6 +66,22 @@ bool cmAddDependenciesCommand::InitialPass(std::vector<std::string> const& args)
tgts[target_name].AddUtility(depend_target.c_str());
}
}
else
{
std::cerr << "existing targets are:";
for(cmTargets::iterator i = tgts.begin();
i != tgts.end(); ++i)
{
std::cerr << i->first << std::endl;
}
std::string error = "Adding dependency to non-existent target: ";
error += target_name;
this->SetError(error.c_str());
return false;
}
return true;
}