diff options
author | Brad King <brad.king@kitware.com> | 2008-03-07 13:40:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-07 13:40:36 (GMT) |
commit | 680104a490250f7b56b67aa3cbb7c113d997e93c (patch) | |
tree | 52af6beb6a876f03a1205c050ad8295e338ca573 /Source/cmAddCustomTargetCommand.cxx | |
parent | 41a59e211ef6b0c9c839545661579934ce9415c1 (diff) | |
download | CMake-680104a490250f7b56b67aa3cbb7c113d997e93c.zip CMake-680104a490250f7b56b67aa3cbb7c113d997e93c.tar.gz CMake-680104a490250f7b56b67aa3cbb7c113d997e93c.tar.bz2 |
ENH: New format for warning and error messages
- Add cmMakefile methods IssueError and IssueWarning
- Maintain an explicit call stack in cmMakefile
- Include context/call-stack info in messages
- Nested errors now unwind the call stack
- Use new mechanism for policy warnings and errors
- Improve policy error message
- Include cmExecutionStatus pointer in call stack
so that errors deeper in the C++ stack under
a command invocation will become errors for the
command
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r-- | Source/cmAddCustomTargetCommand.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 241cdcc..07f00ea 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -18,7 +18,8 @@ // cmAddCustomTargetCommand bool cmAddCustomTargetCommand -::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &) +::InitialPass(std::vector<std::string> const& args, + cmExecutionStatus& status) { // This enum must be before an enum is used in a switch statment. // If not there is an ICE on the itanium version of gcc we are running @@ -45,9 +46,9 @@ bool cmAddCustomTargetCommand switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP_0001)) { case cmPolicies::WARN: - cmSystemTools::Message( + this->Makefile->IssueWarning( this->Makefile->GetPolicies()->GetPolicyWarning - (cmPolicies::CMP_0001).c_str(),"Warning"); + (cmPolicies::CMP_0001)); case cmPolicies::OLD: // if (this->Makefile->IsBWCompatibilityLessThan(2,2)) // { @@ -60,10 +61,11 @@ bool cmAddCustomTargetCommand return false; case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: - this->SetError( + this->Makefile->IssueError( this->Makefile->GetPolicies()->GetRequiredPolicyError - (cmPolicies::CMP_0001).c_str()); - return false; + (cmPolicies::CMP_0001).c_str() + ); + return false; } } |