[Cmake-commits] CMake branch, next, updated. v3.2.3-1419-g02493a5
Stephen Kelly
steveire at gmail.com
Tue Jun 2 19:10:12 EDT 2015
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 02493a5a171bfc1077703982a3bafc3e2b493ecf (commit)
via eb7b6f6db4b2de70aae80fd8143e701b0cfa4268 (commit)
via 499ebb6564800c23bfb6e7b1b706a6202b3f971a (commit)
via 80b433b05ea921e6144c10260cfeafb4b25e5bc1 (commit)
via 52919ac8ac22e1646f8f46907fe9c8e753d954cf (commit)
via b68f2ea8ae26b23639df5978116375b47b4123c3 (commit)
via 17e13f0a2de8dca416521cb5ad9775bf46030c83 (commit)
from b48810b703bd8a53f3739440f936bb95f0f052b9 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02493a5a171bfc1077703982a3bafc3e2b493ecf
commit 02493a5a171bfc1077703982a3bafc3e2b493ecf
Merge: b48810b eb7b6f6
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 2 19:10:11 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 2 19:10:11 2015 -0400
Merge topic 'minor-cleanups' into next
eb7b6f6d cmVariableWatchCommand: Simplify error reporting.
499ebb65 cmListFileBacktrace: Internalize the step of making paths relative.
80b433b0 cmGlobalGenerator: Don't use else after a return.
52919ac8 cmMakefile: Make cmListFileBacktrace default constructible.
b68f2ea8 cmMakefile: Add API for elseif to create backtrace.
17e13f0a cmMakefile: Simplify CMP0000 handling.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb7b6f6db4b2de70aae80fd8143e701b0cfa4268
commit eb7b6f6db4b2de70aae80fd8143e701b0cfa4268
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 23 20:30:37 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:04:01 2015 +0200
cmVariableWatchCommand: Simplify error reporting.
diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx
index 9473008..09cef5e 100644
--- a/Source/cmVariableWatchCommand.cxx
+++ b/Source/cmVariableWatchCommand.cxx
@@ -68,11 +68,8 @@ static void cmVariableWatchCommandVariableAccessed(
cmExecutionStatus status;
if(!makefile->ExecuteCommand(newLFF,status))
{
- arg.FilePath = "Unknown";
- arg.Line = 0;
std::ostringstream error;
- error << "Error in cmake code at\n"
- << arg.FilePath << ":" << arg.Line << ":\n"
+ error << "Error in cmake code at\nUnknown:0:\n"
<< "A command failed during the invocation of callback \""
<< data->Command << "\".";
cmSystemTools::Error(error.str().c_str());
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=499ebb6564800c23bfb6e7b1b706a6202b3f971a
commit 499ebb6564800c23bfb6e7b1b706a6202b3f971a
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 23 13:50:12 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:04:00 2015 +0200
cmListFileBacktrace: Internalize the step of making paths relative.
Currently cmMakefile calls MakeRelative on a copy of the backtrace,
emits the copy to the stream once, then discards the copy. There
is no need to have API for the path conversion.
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 2756cd2..ffe1a1f 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -405,29 +405,17 @@ void cmListFileBacktrace::Append(cmListFileContext const& context)
this->push_back(context);
}
-//----------------------------------------------------------------------------
-void cmListFileBacktrace::MakeRelative()
-{
- if (this->Relative)
- {
- return;
- }
- for (cmListFileBacktrace::iterator i = this->begin();
- i != this->end(); ++i)
- {
- i->FilePath = this->LocalGenerator->Convert(i->FilePath,
- cmLocalGenerator::HOME);
- }
- this->Relative = true;
-}
-
void cmListFileBacktrace::PrintTitle(std::ostream& out)
{
if (this->empty())
{
return;
}
- out << (this->front().Line ? " at " : " in ") << this->front();
+
+ cmListFileContext lfc = this->front();
+ lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
+ cmLocalGenerator::HOME);
+ out << (lfc.Line ? " at " : " in ") << lfc;
}
void cmListFileBacktrace::PrintCallStack(std::ostream& out)
@@ -441,7 +429,9 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out)
out << "Call Stack (most recent call first):\n";
while(i != this->end())
{
- cmListFileContext const& lfc = *i;
+ cmListFileContext lfc = *i;
+ lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
+ cmLocalGenerator::HOME);
out << " " << lfc << "\n";
++i;
}
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index f85b430..1971862a 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -76,19 +76,15 @@ class cmListFileBacktrace: private std::vector<cmListFileContext>
public:
cmListFileBacktrace(cmLocalGenerator* localGen = 0)
: LocalGenerator(localGen)
- , Relative(localGen ? false : true)
{
}
void Append(cmListFileContext const& context);
- void MakeRelative();
-
void PrintTitle(std::ostream& out);
void PrintCallStack(std::ostream& out);
private:
cmLocalGenerator* LocalGenerator;
- bool Relative;
};
struct cmListFile
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 23803ef..6cd005e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2519,7 +2519,6 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
cmListFileBacktrace const& bt)
{
cmListFileBacktrace backtrace = bt;
- backtrace.MakeRelative();
std::ostringstream msg;
if (!this->PrintMessagePreamble(t, msg))
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80b433b05ea921e6144c10260cfeafb4b25e5bc1
commit 80b433b05ea921e6144c10260cfeafb4b25e5bc1
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 27 21:40:39 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:04:00 2015 +0200
cmGlobalGenerator: Don't use else after a return.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cd05c54..2c2cbd8 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -87,18 +87,16 @@ bool cmGlobalGenerator::SetGeneratorPlatform(std::string const& p,
{
return true;
}
- else
- {
- std::ostringstream e;
- e <<
- "Generator\n"
- " " << this->GetName() << "\n"
- "does not support platform specification, but platform\n"
- " " << p << "\n"
- "was specified.";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
- return false;
- }
+
+ std::ostringstream e;
+ e <<
+ "Generator\n"
+ " " << this->GetName() << "\n"
+ "does not support platform specification, but platform\n"
+ " " << p << "\n"
+ "was specified.";
+ mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return false;
}
bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts,
@@ -108,18 +106,15 @@ bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts,
{
return true;
}
- else
- {
- std::ostringstream e;
- e <<
- "Generator\n"
- " " << this->GetName() << "\n"
- "does not support toolset specification, but toolset\n"
- " " << ts << "\n"
- "was specified.";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
- return false;
- }
+ std::ostringstream e;
+ e <<
+ "Generator\n"
+ " " << this->GetName() << "\n"
+ "does not support toolset specification, but toolset\n"
+ " " << ts << "\n"
+ "was specified.";
+ mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return false;
}
std::string cmGlobalGenerator::SelectMakeProgram(
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52919ac8ac22e1646f8f46907fe9c8e753d954cf
commit 52919ac8ac22e1646f8f46907fe9c8e753d954cf
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 30 13:17:55 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:03:59 2015 +0200
cmMakefile: Make cmListFileBacktrace default constructible.
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 015825d..4032b08 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -17,7 +17,7 @@
//----------------------------------------------------------------------------
cmCustomCommand::cmCustomCommand()
- : Backtrace(NULL)
+ : Backtrace()
{
this->HaveComment = false;
this->EscapeOldStyle = true;
@@ -82,7 +82,7 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
WorkingDirectory(workingDirectory?workingDirectory:""),
EscapeAllowMakeVars(false),
EscapeOldStyle(true),
- Backtrace(NULL)
+ Backtrace()
{
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index bf18deb..568ce89 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -18,7 +18,7 @@
//----------------------------------------------------------------------------
cmExportBuildFileGenerator::cmExportBuildFileGenerator()
- : Backtrace(NULL)
+ : Backtrace()
{
this->Makefile = 0;
this->ExportSet = 0;
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index a1c405b..3655a87 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -34,7 +34,7 @@ cmGeneratorExpression::Parse(std::string const& input)
{
return cmsys::auto_ptr<cmCompiledGeneratorExpression>(
new cmCompiledGeneratorExpression(
- this->Backtrace ? *this->Backtrace : cmListFileBacktrace(NULL),
+ this->Backtrace ? *this->Backtrace : cmListFileBacktrace(),
input));
}
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index ff8790c..851aacd 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -35,7 +35,7 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
const GeneratorExpressionContent *content,
cmGeneratorExpressionDAGChecker *parent)
: Parent(parent), Target(target), Property(property),
- Content(content), Backtrace(NULL), TransitivePropertiesOnly(false)
+ Content(content), Backtrace(), TransitivePropertiesOnly(false)
{
Initialize();
}
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 4a1d181..f85b430 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -74,7 +74,7 @@ struct cmListFileFunction: public cmListFileContext
class cmListFileBacktrace: private std::vector<cmListFileContext>
{
public:
- cmListFileBacktrace(cmLocalGenerator* localGen)
+ cmListFileBacktrace(cmLocalGenerator* localGen = 0)
: LocalGenerator(localGen)
, Relative(localGen ? false : true)
{
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 70005b4..dcbcb13 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -94,13 +94,13 @@ class cmTargetInternals
{
public:
cmTargetInternals()
- : Backtrace(NULL)
+ : Backtrace()
{
this->PolicyWarnedCMP0022 = false;
this->UtilityItemsDone = false;
}
cmTargetInternals(cmTargetInternals const&)
- : Backtrace(NULL)
+ : Backtrace()
{
this->PolicyWarnedCMP0022 = false;
this->UtilityItemsDone = false;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 2150b83..0cbb575 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -66,7 +66,7 @@ public:
class cmLinkImplItem: public cmLinkItem
{
public:
- cmLinkImplItem(): cmLinkItem(), Backtrace(0), FromGenex(false) {}
+ cmLinkImplItem(): cmLinkItem(), Backtrace(), FromGenex(false) {}
cmLinkImplItem(std::string const& n,
cmTarget const* t,
cmListFileBacktrace const& bt,
diff --git a/Source/cmake.h b/Source/cmake.h
index 12b7e68..0fe7bfc 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -301,7 +301,7 @@ class cmake
/** Display a message to the user. */
void IssueMessage(cmake::MessageType t, std::string const& text,
- cmListFileBacktrace const& backtrace = cmListFileBacktrace(NULL));
+ cmListFileBacktrace const& backtrace = cmListFileBacktrace());
void IssueMessage(cmake::MessageType t, std::string const& text,
cmListFileContext const& lfc);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b68f2ea8ae26b23639df5978116375b47b4123c3
commit b68f2ea8ae26b23639df5978116375b47b4123c3
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 29 01:14:19 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:03:58 2015 +0200
cmMakefile: Add API for elseif to create backtrace.
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 3551f83..7c4792c 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -92,10 +92,6 @@ IsFunctionBlocked(const cmListFileFunction& lff,
}
else
{
- // Place this call on the call stack.
- cmMakefileCall stack_manager(&mf, this->Functions[c], status);
- static_cast<void>(stack_manager);
-
// if trace is enabled, print the evaluated "elseif" statement
if(mf.GetCMakeInstance()->GetTrace())
{
@@ -119,7 +115,8 @@ IsFunctionBlocked(const cmListFileFunction& lff,
{
std::string err = cmIfCommandError(expandedArguments);
err += errorString;
- mf.IssueMessage(messType, err);
+ cmListFileBacktrace bt = mf.GetBacktrace(this->Functions[c]);
+ mf.GetCMakeInstance()->IssueMessage(messType, err, bt);
if (messType == cmake::FATAL_ERROR)
{
cmSystemTools::SetFatalErrorOccured();
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f09c8cb..9f2a1be 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -287,6 +287,20 @@ cmListFileBacktrace cmMakefile::GetBacktrace() const
}
//----------------------------------------------------------------------------
+cmListFileBacktrace
+cmMakefile::GetBacktrace(cmListFileContext const& lfc) const
+{
+ cmListFileBacktrace backtrace(this->GetLocalGenerator());
+ backtrace.Append(lfc);
+ for(CallStackType::const_reverse_iterator i = this->CallStack.rbegin();
+ i != this->CallStack.rend(); ++i)
+ {
+ backtrace.Append(*i->Context);
+ }
+ return backtrace;
+}
+
+//----------------------------------------------------------------------------
cmListFileContext cmMakefile::GetExecutionContext() const
{
return *this->CallStack.back().Context;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index efd73a1..29a7061 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -572,6 +572,7 @@ public:
* Get the current context backtrace.
*/
cmListFileBacktrace GetBacktrace() const;
+ cmListFileBacktrace GetBacktrace(cmListFileContext const& lfc) const;
cmListFileContext GetExecutionContext() const;
/**
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17e13f0a2de8dca416521cb5ad9775bf46030c83
commit 17e13f0a2de8dca416521cb5ad9775bf46030c83
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 23 10:50:19 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jun 3 01:03:57 2015 +0200
cmMakefile: Simplify CMP0000 handling.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7c74a0f..f09c8cb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -519,8 +519,10 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
{
this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile);
std::string curSrc = this->GetCurrentSourceDirectory();
- return this->ReadListFile(listfile, true,
- curSrc == this->GetHomeDirectory());
+ bool result = this->ReadListFile(listfile, true,
+ curSrc == this->GetHomeDirectory());
+ this->EnforceDirectoryLevelRules();
+ return result;
}
bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
@@ -619,13 +621,6 @@ bool cmMakefile::ReadListFileInternal(const char* filenametoread,
}
}
- // If this is the directory-level CMakeLists.txt file then perform
- // some extra checks.
- if(this->ListFileStack.size() == 1)
- {
- this->EnforceDirectoryLevelRules();
- }
-
return true;
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmCustomCommand.cxx | 4 +--
Source/cmExportBuildFileGenerator.cxx | 2 +-
Source/cmGeneratorExpression.cxx | 2 +-
Source/cmGeneratorExpressionDAGChecker.cxx | 2 +-
Source/cmGlobalGenerator.cxx | 43 ++++++++++++----------------
Source/cmIfCommand.cxx | 7 ++---
Source/cmListFileCache.cxx | 26 ++++++-----------
Source/cmListFileCache.h | 6 +---
Source/cmMakefile.cxx | 27 +++++++++++------
Source/cmMakefile.h | 1 +
Source/cmTarget.cxx | 4 +--
Source/cmTarget.h | 2 +-
Source/cmVariableWatchCommand.cxx | 5 +---
Source/cmake.cxx | 1 -
Source/cmake.h | 2 +-
15 files changed, 59 insertions(+), 75 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list