[Cmake-commits] CMake branch, next, updated. v3.5.1-946-gfb70fd0
Brad King
brad.king at kitware.com
Fri Apr 15 10:29:07 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via fb70fd0af84fbbaf41d12447af134dd37785ac46 (commit)
via 2faa8b362050c716cc5626f9bb9d8a8612b97f95 (commit)
via da07c506b9044e89ad9d904450aa590bb260bd78 (commit)
from c591fc554dbadf24ab0481d3f77e62ce74275dbc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb70fd0af84fbbaf41d12447af134dd37785ac46
commit fb70fd0af84fbbaf41d12447af134dd37785ac46
Merge: c591fc5 2faa8b3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 15 10:29:06 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 15 10:29:06 2016 -0400
Merge topic 'minor-cleanups' into next
2faa8b36 Add call stack to unused/uninitialized variable warnings
da07c506 cmLocalGenerator: Simplify IssueMessage implementation
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2faa8b362050c716cc5626f9bb9d8a8612b97f95
commit 2faa8b362050c716cc5626f9bb9d8a8612b97f95
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 15 10:13:12 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 15 10:13:12 2016 -0400
Add call stack to unused/uninitialized variable warnings
In commit v2.8.4~32^2~14 (Use cmake::IssueMessage for warnings,
2010-12-07) these warnings became formatted. It is more informative to
give the full call stack with such warnings. Also it is easier to
implement warnings with a full call stack because we do not have to
construct a custom backtrace with only the top.
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index 14e9e56..15ab746 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -140,15 +140,8 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
this->Makefile->GetHomeOutputDirectory()))
{
std::ostringstream msg;
- cmListFileContext lfc;
- cmOutputConverter converter(this->Makefile->GetStateSnapshot());
- lfc.FilePath = converter.Convert(this->FileName,
- cmOutputConverter::HOME);
-
- lfc.Line = this->FileLine;
msg << "uninitialized variable \'" << var << "\'";
- this->Makefile->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
- msg.str(), lfc);
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg.str());
}
}
return 0;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 162d3e7..13bcdac 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1961,21 +1961,15 @@ void cmMakefile::LogUnused(const char* reason,
if (this->WarnUnused)
{
std::string path;
- cmListFileContext lfc;
if (!this->ExecutionStatusStack.empty())
{
- lfc = this->GetExecutionContext();
- path = lfc.FilePath;
+ path = this->GetExecutionContext().FilePath;
}
else
{
path = this->GetCurrentSourceDirectory();
path += "/CMakeLists.txt";
- lfc.FilePath = path;
- lfc.Line = 0;
}
- cmOutputConverter converter(this->StateSnapshot);
- lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME);
if (this->CheckSystemVars ||
cmSystemTools::IsSubDirectory(path,
@@ -1987,9 +1981,7 @@ void cmMakefile::LogUnused(const char* reason,
{
std::ostringstream msg;
msg << "unused variable (" << reason << ") \'" << name << "\'";
- this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
- msg.str(),
- lfc);
+ this->IssueMessage(cmake::AUTHOR_WARNING, msg.str());
}
}
}
@@ -2919,14 +2911,8 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
this->GetHomeOutputDirectory()))
{
std::ostringstream msg;
- cmListFileContext lfc;
- cmOutputConverter converter(this->StateSnapshot);
- lfc.FilePath =
- converter.Convert(filename, cmOutputConverter::HOME);
- lfc.Line = line;
msg << "uninitialized variable \'" << lookup << "\'";
- this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
- msg.str(), lfc);
+ this->IssueMessage(cmake::AUTHOR_WARNING, msg.str());
}
}
}
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da07c506b9044e89ad9d904450aa590bb260bd78
commit da07c506b9044e89ad9d904450aa590bb260bd78
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 15 10:08:37 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 15 10:13:08 2016 -0400
cmLocalGenerator: Simplify IssueMessage implementation
This method was added by commit v3.4.0-rc1~424^2~6 (cmLocalGenerator:
Add IssueMessage method, 2015-06-13) in order to reduce callers'
dependency on cmMakefile. Currently the implementation of
cmLocalGenerator::IssueMessage is just a copy of the post-configure code
path in cmMakefile::IssueMessage. De-duplicate the implementation by
simply calling the cmMakefile copy for now. This will simplify upcoming
refactoring of backtraces. The dependency on cmMakefile can be removed
by future work once that is done.
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 746bcab..b93fc21 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -69,17 +69,7 @@ cmLocalGenerator::~cmLocalGenerator()
void cmLocalGenerator::IssueMessage(cmake::MessageType t,
std::string const& text) const
{
- cmListFileContext lfc;
- lfc.FilePath = this->StateSnapshot.GetDirectory().GetCurrentSource();
- lfc.FilePath += "/CMakeLists.txt";
-
- if(!this->GlobalGenerator->GetCMakeInstance()->GetIsInTryCompile())
- {
- cmOutputConverter converter(this->StateSnapshot);
- lfc.FilePath = converter.Convert(lfc.FilePath, cmLocalGenerator::HOME);
- }
- lfc.Line = 0;
- this->GlobalGenerator->GetCMakeInstance()->IssueMessage(t, text, lfc);
+ this->Makefile->IssueMessage(t, text);
}
//----------------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
Source/cmCommandArgumentParserHelper.cxx | 9 +--------
Source/cmLocalGenerator.cxx | 12 +-----------
Source/cmMakefile.cxx | 20 +++-----------------
3 files changed, 5 insertions(+), 36 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list