diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
commit | 297c63fa65327491a2b50e521b661c5835a19fe4 (patch) | |
tree | cf30d58014e240eb5e4417727d8f137cdbe75828 /Source/cmAddDependenciesCommand.cxx | |
parent | ef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff) | |
download | cmake-upstream/2.8.11.2.tar.gz cmake-upstream/2.8.11.2.tar.bz2 cmake-upstream/2.8.11.2.zip |
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Source/cmAddDependenciesCommand.cxx')
-rw-r--r-- | Source/cmAddDependenciesCommand.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx index a77140d61..04a304e39 100644 --- a/Source/cmAddDependenciesCommand.cxx +++ b/Source/cmAddDependenciesCommand.cxx @@ -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; |