[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-560-gd536b44
Stephen Kelly
steveire at gmail.com
Sun Jun 21 14:29:23 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 d536b447c65401b0a3e3383d4aed457d641d468f (commit)
via 217c243db04a21763848ac048edf153cd93bd883 (commit)
via eb05dcd6c9b587eeb8738d9f08459d94733708f6 (commit)
via cfae7fa4082e73d4282be98fa99a07c18dd53d24 (commit)
via ccf7760f0035e2e0458ba59e29ab302a2d07c388 (commit)
from 8a2406a57e01585050c4d451a209eeb16d83b106 (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=d536b447c65401b0a3e3383d4aed457d641d468f
commit d536b447c65401b0a3e3383d4aed457d641d468f
Merge: 8a2406a 217c243
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 14:29:22 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jun 21 14:29:22 2015 -0400
Merge topic 'minor-cleanups' into next
217c243d cmake: Update the current snapshot when Resetting.
eb05dcd6 cmLocalGenerator: Add IssueMessage method.
cfae7fa4 cmMakefile: Use cmOutputConverter instead of cmLocalGenerator.
ccf7760f cmOutputConverter: Constify API.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=217c243db04a21763848ac048edf153cd93bd883
commit 217c243db04a21763848ac048edf153cd93bd883
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 14 01:08:34 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:19:53 2015 +0200
cmake: Update the current snapshot when Resetting.
This will matter when definitions are stored in the cmState.
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index f0c7e6d..58500cc 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -219,13 +219,13 @@ void cmState::RemoveCacheEntryProperty(std::string const& key,
->GetCacheIterator(key.c_str()).SetProperty(propertyName, (void*)0);
}
-void cmState::Reset()
+cmState::Snapshot cmState::Reset()
{
this->GlobalProperties.clear();
this->PropertyDefinitions.clear();
this->BuildsystemDirectory.Truncate();
- this->SnapshotData.Truncate();
+ PositionType pos = this->SnapshotData.Truncate();
this->DefineProperty
("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY,
@@ -246,6 +246,8 @@ void cmState::Reset()
this->DefineProperty
("RULE_LAUNCH_CUSTOM", cmProperty::TARGET,
"", "", true);
+
+ return Snapshot(this, pos);
}
void cmState::DefineProperty(const std::string& name,
diff --git a/Source/cmState.h b/Source/cmState.h
index 070a08b..9c7574f 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -105,7 +105,7 @@ public:
void RemoveCacheEntryProperty(std::string const& key,
std::string const& propertyName);
- void Reset();
+ Snapshot Reset();
// Define a property
void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
const char *ShortDescription,
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index eeb6575..e51b260 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -186,7 +186,7 @@ cmake::~cmake()
void cmake::CleanupCommandsAndMacros()
{
- this->State->Reset();
+ this->CurrentSnapshot = this->State->Reset();
this->State->RemoveUserDefinedCommands();
}
@@ -370,6 +370,7 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
// read in the list file to fill the cache
if(path)
{
+ this->CurrentSnapshot = this->State->Reset();
std::string homeDir = this->GetHomeDirectory();
std::string homeOutputDir = this->GetHomeOutputDirectory();
this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb05dcd6c9b587eeb8738d9f08459d94733708f6
commit eb05dcd6c9b587eeb8738d9f08459d94733708f6
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 13 19:32:46 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:17:59 2015 +0200
cmLocalGenerator: Add IssueMessage method.
For use at generate-time instead of the cmMakefile method of the same name.
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 67d0d54..2f68ab0 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -705,7 +705,8 @@ cmTargetTraceDependencies
e << "Evaluation output file\n \"" << sf->GetFullPath()
<< "\"\ndepends on the sources of a target it is used in. This "
"is a dependency loop and is not allowed.";
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ this->GeneratorTarget
+ ->LocalGenerator->IssueMessage(cmake::FATAL_ERROR, e.str());
return;
}
if(emitted.insert(sf).second && this->SourcesQueued.insert(sf).second)
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 98accf9..a42d5a7 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -73,6 +73,22 @@ bool cmLocalGenerator::IsRootMakefile() const
return !this->StateSnapshot.GetBuildsystemDirectoryParent().IsValid();
}
+void cmLocalGenerator::IssueMessage(cmake::MessageType t,
+ std::string const& text) const
+{
+ cmListFileContext lfc;
+ lfc.FilePath = this->StateSnapshot.GetCurrentSourceDirectory();
+ 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);
+}
+
//----------------------------------------------------------------------------
void cmLocalGenerator::ComputeObjectMaxPath()
{
@@ -98,7 +114,7 @@ void cmLocalGenerator::ComputeObjectMaxPath()
w << "CMAKE_OBJECT_PATH_MAX is set to " << pmax
<< ", which is less than the minimum of 128. "
<< "The value will be ignored.";
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
}
else
@@ -107,7 +123,7 @@ void cmLocalGenerator::ComputeObjectMaxPath()
w << "CMAKE_OBJECT_PATH_MAX is set to \"" << plen
<< "\", which fails to parse as a positive integer. "
<< "The value will be ignored.";
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
}
this->ObjectMaxPathViolations.clear();
@@ -1317,7 +1333,7 @@ void cmLocalGenerator::AddCompileOptions(
"higher \"" << it->first << "_STANDARD\" \"" << standard << "\". "
"This is not permitted. The COMPILE_FEATURES may not both depend on "
"and be depended on by the link implementation." << std::endl;
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
return;
}
}
@@ -2041,7 +2057,7 @@ AddCompilerRequirementFlag(std::string &flags, cmTarget const* target,
"dialect \"" << lang << standardProp << "\" "
<< (ext ? "(with compiler extensions)" : "") << ", but CMake "
"does not know the compile flags to use to enable it.";
- this->GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str());
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
}
else
{
@@ -2085,7 +2101,7 @@ AddCompilerRequirementFlag(std::string &flags, cmTarget const* target,
std::string e =
"CMAKE_" + lang + "_STANDARD_DEFAULT is set to invalid value '" +
std::string(defaultStd) + "'";
- this->Makefile->IssueMessage(cmake::INTERNAL_ERROR, e);
+ this->IssueMessage(cmake::INTERNAL_ERROR, e);
return;
}
@@ -2301,7 +2317,7 @@ bool cmLocalGenerator::GetShouldUseOldFlags(bool shared,
<< flagsVar << " was removed.\n"
<< cmPolicies::GetPolicyWarning(cmPolicies::CMP0018);
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, e.str());
+ this->IssueMessage(cmake::AUTHOR_WARNING, e.str());
// fall through to OLD behaviour
}
case cmPolicies::OLD:
@@ -2813,7 +2829,7 @@ cmLocalGenerator
<< " " << ssin << "\n"
<< "cannot be safely placed under this directory. "
<< "The build may not work correctly.";
- this->Makefile->IssueMessage(cmake::WARNING, m.str());
+ this->IssueMessage(cmake::WARNING, m.str());
}
}
#else
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 6a8c5aa..4452eef 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -14,6 +14,7 @@
#include "cmStandardIncludes.h"
#include "cmState.h"
+#include "cmake.h"
#include "cmOutputConverter.h"
class cmMakefile;
@@ -304,6 +305,9 @@ public:
bool IsMinGWMake() const;
bool IsNMake() const;
+ void IssueMessage(cmake::MessageType t, std::string const& text) const;
+
+
void ComputeObjectMaxPath();
protected:
///! put all the libraries for a target on into the given stream
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfae7fa4082e73d4282be98fa99a07c18dd53d24
commit cfae7fa4082e73d4282be98fa99a07c18dd53d24
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 20:16:37 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:17:18 2015 +0200
cmMakefile: Use cmOutputConverter instead of cmLocalGenerator.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 63dbe27..0338062 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -264,8 +264,8 @@ void cmMakefile::IssueMessage(cmake::MessageType t,
if(!this->GetCMakeInstance()->GetIsInTryCompile())
{
- lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
- cmLocalGenerator::HOME);
+ cmOutputConverter converter(this->StateSnapshot);
+ lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME);
}
lfc.Line = 0;
this->GetCMakeInstance()->IssueMessage(t, text, lfc);
@@ -1963,8 +1963,8 @@ void cmMakefile::LogUnused(const char* reason,
lfc.FilePath = path;
lfc.Line = 0;
}
- lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
- cmLocalGenerator::HOME);
+ cmOutputConverter converter(this->StateSnapshot);
+ lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME);
if (this->CheckSystemVars ||
cmSystemTools::IsSubDirectory(path,
@@ -2861,8 +2861,9 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
{
std::ostringstream msg;
cmListFileContext lfc;
- lfc.FilePath = this->LocalGenerator
- ->Convert(filename, cmLocalGenerator::HOME);
+ cmOutputConverter converter(this->StateSnapshot);
+ lfc.FilePath =
+ converter.Convert(filename, cmOutputConverter::HOME);
lfc.Line = line;
msg << "uninitialized variable \'" << lookup << "\'";
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccf7760f0035e2e0458ba59e29ab302a2d07c388
commit ccf7760f0035e2e0458ba59e29ab302a2d07c388
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 14 20:27:37 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:13:28 2015 +0200
cmOutputConverter: Constify API.
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index db73a34..b0a30a1 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -27,7 +27,7 @@ cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot)
std::string
cmOutputConverter::ConvertToOutputForExistingCommon(const std::string& remote,
std::string const& result,
- OutputFormat format)
+ OutputFormat format) const
{
// If this is a windows shell, the result has a space, and the path
// already exists, we can use a short-path to reference it without a
@@ -50,7 +50,7 @@ cmOutputConverter::ConvertToOutputForExistingCommon(const std::string& remote,
std::string
cmOutputConverter::ConvertToOutputForExisting(const std::string& remote,
RelativeRoot local,
- OutputFormat format)
+ OutputFormat format) const
{
static_cast<void>(local);
@@ -65,7 +65,7 @@ cmOutputConverter::ConvertToOutputForExisting(const std::string& remote,
std::string
cmOutputConverter::ConvertToOutputForExisting(RelativeRoot remote,
const std::string& local,
- OutputFormat format)
+ OutputFormat format) const
{
// Perform standard conversion.
std::string result = this->Convert(remote, local, format, true);
@@ -76,7 +76,7 @@ cmOutputConverter::ConvertToOutputForExisting(RelativeRoot remote,
}
//----------------------------------------------------------------------------
-const char* cmOutputConverter::GetRelativeRootPath(RelativeRoot relroot)
+const char* cmOutputConverter::GetRelativeRootPath(RelativeRoot relroot) const
{
switch (relroot)
{
@@ -91,7 +91,7 @@ const char* cmOutputConverter::GetRelativeRootPath(RelativeRoot relroot)
std::string cmOutputConverter::Convert(const std::string& source,
RelativeRoot relative,
- OutputFormat output)
+ OutputFormat output) const
{
// Convert the path to a relative path.
std::string result = source;
@@ -125,7 +125,7 @@ std::string cmOutputConverter::Convert(const std::string& source,
//----------------------------------------------------------------------------
std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source,
- OutputFormat output)
+ OutputFormat output) const
{
std::string result = source;
// Convert it to an output path.
@@ -163,7 +163,7 @@ std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source,
std::string cmOutputConverter::Convert(RelativeRoot remote,
const std::string& local,
OutputFormat output,
- bool optional)
+ bool optional) const
{
const char* remotePath = this->GetRelativeRootPath(remote);
@@ -192,7 +192,7 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b)
std::string
cmOutputConverter::ConvertToRelativePath(const std::vector<std::string>& local,
const std::string& in_remote,
- bool force)
+ bool force) const
{
// The path should never be quoted.
assert(in_remote[0] != '\"');
@@ -318,7 +318,7 @@ static bool cmOutputConverterIsShellOperator(const std::string& str)
std::string cmOutputConverter::EscapeForShell(const std::string& str,
bool makeVars,
bool forEcho,
- bool useWatcomQuote)
+ bool useWatcomQuote) const
{
// Do not escape shell operators.
if(cmOutputConverterIsShellOperator(str))
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index 1d3f8c7..482a64b 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -39,35 +39,35 @@ public:
enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
enum OutputFormat { UNCHANGED, MAKERULE, SHELL, WATCOMQUOTE, RESPONSE };
std::string ConvertToOutputFormat(const std::string& source,
- OutputFormat output);
+ OutputFormat output) const;
std::string Convert(const std::string& remote, RelativeRoot local,
- OutputFormat output = UNCHANGED);
+ OutputFormat output = UNCHANGED) const;
std::string Convert(RelativeRoot remote, const std::string& local,
OutputFormat output = UNCHANGED,
- bool optional = false);
+ bool optional = false) const;
/**
* Get path for the specified relative root.
*/
- const char* GetRelativeRootPath(RelativeRoot relroot);
+ const char* GetRelativeRootPath(RelativeRoot relroot) const;
///! for existing files convert to output path and short path if spaces
std::string ConvertToOutputForExisting(const std::string& remote,
RelativeRoot local = START_OUTPUT,
- OutputFormat format = SHELL);
+ OutputFormat format = SHELL) const;
/** For existing path identified by RelativeRoot convert to output
path and short path if spaces. */
std::string ConvertToOutputForExisting(RelativeRoot remote,
const std::string& local = "",
- OutputFormat format = SHELL);
+ OutputFormat format = SHELL) const;
void SetLinkScriptShell(bool linkScriptShell);
std::string EscapeForShell(const std::string& str,
bool makeVars = false,
bool forEcho = false,
- bool useWatcomQuote = false);
+ bool useWatcomQuote = false) const;
static std::string EscapeForCMake(const std::string& str);
@@ -88,14 +88,14 @@ public:
*/
std::string ConvertToRelativePath(const std::vector<std::string>& local,
const std::string& in_remote,
- bool force = false);
+ bool force = false) const;
private:
cmState* GetState() const;
std::string ConvertToOutputForExistingCommon(const std::string& remote,
std::string const& result,
- OutputFormat format);
+ OutputFormat format) const;
private:
cmState::Snapshot StateSnapshot;
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index a13c13f..f0c7e6d 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -741,14 +741,14 @@ void cmState::Snapshot::SetCurrentBinaryDirectory(std::string const& dir)
}
std::vector<std::string> const&
-cmState::Snapshot::GetCurrentSourceDirectoryComponents()
+cmState::Snapshot::GetCurrentSourceDirectoryComponents() const
{
return this->Position->BuildSystemDirectory
->CurrentSourceDirectoryComponents;
}
std::vector<std::string> const&
-cmState::Snapshot::GetCurrentBinaryDirectoryComponents()
+cmState::Snapshot::GetCurrentBinaryDirectoryComponents() const
{
return this->Position->BuildSystemDirectory
->CurrentBinaryDirectoryComponents;
diff --git a/Source/cmState.h b/Source/cmState.h
index 353a6c6..070a08b 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -43,8 +43,10 @@ public:
const char* GetCurrentBinaryDirectory() const;
void SetCurrentBinaryDirectory(std::string const& dir);
- std::vector<std::string> const& GetCurrentSourceDirectoryComponents();
- std::vector<std::string> const& GetCurrentBinaryDirectoryComponents();
+ std::vector<std::string> const&
+ GetCurrentSourceDirectoryComponents() const;
+ std::vector<std::string> const&
+ GetCurrentBinaryDirectoryComponents() const;
const char* GetRelativePathTopSource() const;
const char* GetRelativePathTopBinary() const;
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorTarget.cxx | 3 ++-
Source/cmLocalGenerator.cxx | 30 +++++++++++++++++++++++-------
Source/cmLocalGenerator.h | 4 ++++
Source/cmMakefile.cxx | 13 +++++++------
Source/cmOutputConverter.cxx | 18 +++++++++---------
Source/cmOutputConverter.h | 18 +++++++++---------
Source/cmState.cxx | 10 ++++++----
Source/cmState.h | 8 +++++---
Source/cmake.cxx | 3 ++-
9 files changed, 67 insertions(+), 40 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list