[Cmake-commits] CMake branch, next, updated. v3.6.1-1571-g0dd8dc6
Stephen Kelly
steveire at gmail.com
Sat Aug 27 09:41:32 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 0dd8dc67bc08d52744d501bdbedd077d2a1641a9 (commit)
via 9cc5a4dd1f6d764830c7da33fa0c735124b6cd80 (commit)
via d71230b33fea484a758726f12dc98bed95b5336c (commit)
via f4028af43e062cb4b01e743236fd3efc3d0ff47d (commit)
via e5d8ff5cf57be72c60911b6e2bf5e47dd8ad4c04 (commit)
from 32389a10550df33224522978f5b9d6794c628d55 (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=0dd8dc67bc08d52744d501bdbedd077d2a1641a9
commit 0dd8dc67bc08d52744d501bdbedd077d2a1641a9
Merge: 32389a1 9cc5a4d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 27 09:41:31 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Aug 27 09:41:31 2016 -0400
Merge topic 'cleanup-Convert' into next
9cc5a4dd Convert: Make variables a bit more clear
d71230b3 Convert: Remove UNCHANGED enum value
f4028af4 Convert: Remove 'FULL' conversion
e5d8ff5c Convert: Replace Convert(FULL) with equivalent
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cc5a4dd1f6d764830c7da33fa0c735124b6cd80
commit 9cc5a4dd1f6d764830c7da33fa0c735124b6cd80
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 27 13:44:58 2016 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Aug 27 15:41:18 2016 +0200
Convert: Make variables a bit more clear
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index f056a1b..630da42 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -49,26 +49,26 @@ std::string cmOutputConverter::ConvertToOutputForExisting(
std::string cmOutputConverter::ConvertToRelativePath(
const std::string& source, RelativeRoot relative) const
{
- std::string result = source;
+ std::string result;
switch (relative) {
case HOME:
result = this->ConvertToRelativePath(
- this->GetState()->GetSourceDirectoryComponents(), result);
+ this->GetState()->GetSourceDirectoryComponents(), source);
break;
case START:
result = this->ConvertToRelativePath(
this->StateSnapshot.GetDirectory().GetCurrentSourceComponents(),
- result);
+ source);
break;
case HOME_OUTPUT:
result = this->ConvertToRelativePath(
- this->GetState()->GetBinaryDirectoryComponents(), result);
+ this->GetState()->GetBinaryDirectoryComponents(), source);
break;
case START_OUTPUT:
result = this->ConvertToRelativePath(
this->StateSnapshot.GetDirectory().GetCurrentBinaryComponents(),
- result);
+ source);
break;
}
return result;
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d71230b33fea484a758726f12dc98bed95b5336c
commit d71230b33fea484a758726f12dc98bed95b5336c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 27 13:44:57 2016 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Aug 27 15:41:17 2016 +0200
Convert: Remove UNCHANGED enum value
It is no longer used.
diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h
index d3f9d64..b433c18 100644
--- a/Source/cmCommonTargetGenerator.h
+++ b/Source/cmCommonTargetGenerator.h
@@ -57,9 +57,9 @@ protected:
// The windows module definition source file (.def), if any.
cmSourceFile const* ModuleDefinitionFile;
- std::string Convert(
- std::string const& source, cmOutputConverter::RelativeRoot relative,
- cmOutputConverter::OutputFormat output = cmOutputConverter::UNCHANGED);
+ std::string Convert(std::string const& source,
+ cmOutputConverter::RelativeRoot relative,
+ cmOutputConverter::OutputFormat output);
void AppendFortranFormatFlags(std::string& flags,
cmSourceFile const& source);
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index c2403db..9af9659 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -45,7 +45,6 @@ public:
};
enum OutputFormat
{
- UNCHANGED,
MAKERULE,
SHELL,
WATCOMQUOTE,
@@ -54,7 +53,7 @@ public:
std::string ConvertToOutputFormat(const std::string& source,
OutputFormat output) const;
std::string Convert(const std::string& remote, RelativeRoot local,
- OutputFormat output = UNCHANGED) const;
+ OutputFormat output) const;
std::string ConvertToRelativePath(const std::string& remote,
RelativeRoot local) const;
std::string ConvertDirectorySeparatorsForShell(
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4028af43e062cb4b01e743236fd3efc3d0ff47d
commit f4028af43e062cb4b01e743236fd3efc3d0ff47d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 27 13:44:57 2016 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Aug 27 15:41:17 2016 +0200
Convert: Remove 'FULL' conversion
It is no longer used.
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index 176c9a0..f056a1b 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -70,9 +70,6 @@ std::string cmOutputConverter::ConvertToRelativePath(
this->StateSnapshot.GetDirectory().GetCurrentBinaryComponents(),
result);
break;
- case FULL:
- result = cmSystemTools::CollapseFullPath(result);
- break;
}
return result;
}
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index 71bb086..c2403db 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -38,7 +38,6 @@ public:
*/
enum RelativeRoot
{
- FULL,
HOME,
START,
HOME_OUTPUT,
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5d8ff5cf57be72c60911b6e2bf5e47dd8ad4c04
commit e5d8ff5cf57be72c60911b6e2bf5e47dd8ad4c04
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 27 13:44:57 2016 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Aug 27 15:41:17 2016 +0200
Convert: Replace Convert(FULL) with equivalent
This is more explicit than funnelling everything through the Convert
method.
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index bbc794d..77fbbe9 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -723,8 +723,9 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
// # in target
- progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ progCmd << lg->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(progress.Dir),
+ cmOutputConverter::SHELL);
//
std::set<cmGeneratorTarget const*> emitted;
progCmd << " " << this->CountProgressMarksInTarget(gtarget, emitted);
@@ -736,8 +737,9 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
{
std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
- progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ progCmd << lg->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(progress.Dir),
+ cmOutputConverter::SHELL);
progCmd << " 0";
commands.push_back(progCmd.str());
}
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2fa3f86..de9e1e5 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -688,7 +688,9 @@ std::string cmLocalGenerator::ExpandRuleVariable(
}
}
if (variable == "CMAKE_COMMAND") {
- return this->Convert(cmSystemTools::GetCMakeCommand(), FULL, SHELL);
+ return this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()),
+ SHELL);
}
std::vector<std::string> enabledLanguages =
this->GetState()->GetEnabledLanguages();
@@ -1183,7 +1185,8 @@ void cmLocalGenerator::GetTargetFlags(
if (sf->GetExtension() == "def") {
linkFlags +=
this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
- linkFlags += this->Convert(sf->GetFullPath(), FULL, SHELL);
+ linkFlags += this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(sf->GetFullPath()), SHELL);
linkFlags += " ";
}
}
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index bbec634..d07bfaa 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -133,7 +133,8 @@ std::string cmLocalNinjaGenerator::ConvertToIncludeReference(
bool forceFullPaths)
{
if (forceFullPaths) {
- return this->Convert(path, cmOutputConverter::FULL, format);
+ return this->ConvertToOutputFormat(cmSystemTools::CollapseFullPath(path),
+ format);
}
return this->Convert(path, cmOutputConverter::HOME_OUTPUT, format);
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 0a0089b..7fa35b8 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -640,9 +640,9 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
std::string cmakeShellCommand =
this->MaybeConvertWacomShellCommand(cmSystemTools::GetCMakeCommand());
if (cmakeShellCommand.empty()) {
- cmakeShellCommand =
- this->Convert(cmSystemTools::GetCMakeCommand(), cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ cmakeShellCommand = this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()),
+ cmOutputConverter::SHELL);
}
/* clang-format off */
@@ -665,16 +665,16 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
makefileStream
<< "# The top-level source directory on which CMake was run.\n"
<< "CMAKE_SOURCE_DIR = "
- << this->Convert(this->GetSourceDirectory(),
- cmOutputConverter::FULL,
+ << this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(this->GetSourceDirectory()),
cmOutputConverter::SHELL)
<< "\n"
<< "\n";
makefileStream
<< "# The top-level build directory on which CMake was run.\n"
<< "CMAKE_BINARY_DIR = "
- << this->Convert(this->GetBinaryDirectory(),
- cmOutputConverter::FULL,
+ << this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(this->GetBinaryDirectory()),
cmOutputConverter::SHELL)
<< "\n"
<< "\n";
@@ -1154,8 +1154,9 @@ void cmLocalUnixMakefileGenerator3::AppendEcho(
cmd += color_name;
if (progress) {
cmd += "--progress-dir=";
- cmd += this->Convert(progress->Dir, cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ cmd += this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(progress->Dir),
+ cmOutputConverter::SHELL);
cmd += " ";
cmd += "--progress-num=";
cmd += progress->Arg;
@@ -1603,15 +1604,16 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
{
std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
- progCmd << this->Convert(progressDir, cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ progCmd << this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL);
std::string progressFile = cmake::GetCMakeFilesDirectory();
progressFile += "/progress.marks";
std::string progressFileNameFull = this->ConvertToFullPath(progressFile);
progCmd << " "
- << this->Convert(progressFileNameFull, cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ << this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(progressFileNameFull),
+ cmOutputConverter::SHELL);
commands.push_back(progCmd.str());
}
std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
@@ -1623,8 +1625,8 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
{
std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
- progCmd << this->Convert(progressDir, cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ progCmd << this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL);
progCmd << " 0";
commands.push_back(progCmd.str());
}
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 1beaa87..70fe819 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -269,8 +269,8 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
args += this->GetBinaryDirectory();
commandLine.push_back(args);
commandLine.push_back("--check-stamp-file");
- std::string stampFilename = this->Convert(
- stampName.c_str(), cmOutputConverter::FULL, cmOutputConverter::SHELL);
+ std::string stampFilename = this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(stampName), cmOutputConverter::SHELL);
commandLine.push_back(stampFilename.c_str());
std::vector<std::string> const& listFiles = this->Makefile->GetListFiles();
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index d1cefe3..b492962 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -155,7 +155,8 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
script += newline;
newline = newline_text;
script += "cd ";
- script += this->Convert(workingDirectory, FULL, SHELL);
+ script += this->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(workingDirectory), SHELL);
script += check_error;
// Change the working drive.
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index b34cd6e..165f96c 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1000,9 +1000,10 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
// paths. Make sure PWD is set to the original name of the home
// output directory to help cmSystemTools to create the same
// translation table for the dependency scanning process.
- depCmd << "cd " << (this->LocalGenerator->Convert(
- this->LocalGenerator->GetBinaryDirectory(),
- cmOutputConverter::FULL, cmOutputConverter::SHELL))
+ depCmd << "cd " << (this->LocalGenerator->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(
+ this->LocalGenerator->GetBinaryDirectory()),
+ cmOutputConverter::SHELL))
<< " && ";
#endif
// Generate a call this signature:
@@ -1016,20 +1017,29 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
// the state of our local generator sufficiently for its needs.
depCmd << "$(CMAKE_COMMAND) -E cmake_depends \""
<< this->GlobalGenerator->GetName() << "\" "
- << this->Convert(this->LocalGenerator->GetSourceDirectory(),
- cmOutputConverter::FULL, cmOutputConverter::SHELL)
+ << this->LocalGenerator->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(
+ this->LocalGenerator->GetSourceDirectory()),
+ cmOutputConverter::SHELL)
<< " "
- << this->Convert(this->LocalGenerator->GetCurrentSourceDirectory(),
- cmOutputConverter::FULL, cmOutputConverter::SHELL)
+ << this->LocalGenerator->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(
+ this->LocalGenerator->GetCurrentSourceDirectory()),
+ cmOutputConverter::SHELL)
<< " "
- << this->Convert(this->LocalGenerator->GetBinaryDirectory(),
- cmOutputConverter::FULL, cmOutputConverter::SHELL)
+ << this->LocalGenerator->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(
+ this->LocalGenerator->GetBinaryDirectory()),
+ cmOutputConverter::SHELL)
<< " "
- << this->Convert(this->LocalGenerator->GetCurrentBinaryDirectory(),
- cmOutputConverter::FULL, cmOutputConverter::SHELL)
+ << this->LocalGenerator->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(
+ this->LocalGenerator->GetCurrentBinaryDirectory()),
+ cmOutputConverter::SHELL)
<< " "
- << this->Convert(this->InfoFileNameFull, cmOutputConverter::FULL,
- cmOutputConverter::SHELL);
+ << this->LocalGenerator->ConvertToOutputFormat(
+ cmSystemTools::CollapseFullPath(this->InfoFileNameFull),
+ cmOutputConverter::SHELL);
if (this->LocalGenerator->GetColorMakefile()) {
depCmd << " --color=$(COLOR)";
}
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list