diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-27 18:55:05 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-27 18:55:05 (GMT) |
commit | 445f122a92bcd46cc3b5e1e0fc0cf1fb3ecc8d45 (patch) | |
tree | aec7f98ea828d1422f761b3bcad2ce488af9d6df /Source/cmAddDependenciesCommand.cxx | |
parent | 3d24bc75bd88174d00afd17629ab6f5d6849f3ac (diff) | |
download | CMake-445f122a92bcd46cc3b5e1e0fc0cf1fb3ecc8d45.zip CMake-445f122a92bcd46cc3b5e1e0fc0cf1fb3ecc8d45.tar.gz CMake-445f122a92bcd46cc3b5e1e0fc0cf1fb3ecc8d45.tar.bz2 |
ENH: add error checking
Diffstat (limited to 'Source/cmAddDependenciesCommand.cxx')
-rw-r--r-- | Source/cmAddDependenciesCommand.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx index 5b2cc6e..99cca8d 100644 --- a/Source/cmAddDependenciesCommand.cxx +++ b/Source/cmAddDependenciesCommand.cxx @@ -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; } |