[Cmake-commits] CMake branch, master, updated. v3.13.2-819-g6a796b5
Kitware Robot
kwrobot at kitware.com
Tue Jan 8 10:03:05 EST 2019
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, master has been updated
via 6a796b57b25267e13532e22c0f31551aa7c81acf (commit)
via 1cf9c754db3fcdcd500dbec48e509535135eba1b (commit)
from f5da1bb34954b1a9e78f07133f4aa3ce332a329f (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=6a796b57b25267e13532e22c0f31551aa7c81acf
commit 6a796b57b25267e13532e22c0f31551aa7c81acf
Merge: f5da1bb 1cf9c75
Author: Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Tue Jan 8 14:55:22 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 8 09:55:47 2019 -0500
Merge topic 'modernize-for'
1cf9c754db Source: Modernize for loops, add const modifiers
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2765
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1cf9c754db3fcdcd500dbec48e509535135eba1b
commit 1cf9c754db3fcdcd500dbec48e509535135eba1b
Author: Vitaly Stakhovsky <vvs31415 at gitlab.org>
AuthorDate: Sun Dec 30 14:31:53 2018 -0500
Commit: Vitaly Stakhovsky <vvs31415 at gitlab.org>
CommitDate: Mon Dec 31 11:50:40 2018 -0500
Source: Modernize for loops, add const modifiers
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index bbc90a2..2fa593c 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -59,18 +59,17 @@ void cmExtraCodeLiteGenerator::Generate()
// and extract the information for creating the worspace
// root makefile
for (auto const& it : projectMap) {
- const cmMakefile* mf = it.second[0]->GetMakefile();
+ cmLocalGenerator* lg = it.second[0];
+ const cmMakefile* mf = lg->GetMakefile();
this->ConfigName = GetConfigurationName(mf);
- if (it.second[0]->GetCurrentBinaryDirectory() ==
- it.second[0]->GetBinaryDirectory()) {
- workspaceOutputDir = it.second[0]->GetCurrentBinaryDirectory();
- workspaceProjectName = it.second[0]->GetProjectName();
- workspaceSourcePath = it.second[0]->GetSourceDirectory();
+ if (lg->GetCurrentBinaryDirectory() == lg->GetBinaryDirectory()) {
+ workspaceOutputDir = lg->GetCurrentBinaryDirectory();
+ workspaceProjectName = lg->GetProjectName();
+ workspaceSourcePath = lg->GetSourceDirectory();
workspaceFileName = workspaceOutputDir + "/";
workspaceFileName += workspaceProjectName + ".workspace";
- this->WorkspacePath = it.second[0]->GetCurrentBinaryDirectory();
- ;
+ this->WorkspacePath = lg->GetCurrentBinaryDirectory();
break;
}
}
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 2727d9a..96d4ad6 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -71,16 +71,11 @@ const std::string& cmCompiledGeneratorExpression::EvaluateWithContext(
this->Output.clear();
- std::vector<cmGeneratorExpressionEvaluator*>::const_iterator it =
- this->Evaluators.begin();
- const std::vector<cmGeneratorExpressionEvaluator*>::const_iterator end =
- this->Evaluators.end();
+ for (const cmGeneratorExpressionEvaluator* it : this->Evaluators) {
+ this->Output += it->Evaluate(&context, dagChecker);
- for (; it != end; ++it) {
- this->Output += (*it)->Evaluate(&context, dagChecker);
-
- this->SeenTargetProperties.insert(context.SeenTargetProperties.begin(),
- context.SeenTargetProperties.end());
+ this->SeenTargetProperties.insert(context.SeenTargetProperties.cbegin(),
+ context.SeenTargetProperties.cend());
if (context.HadError) {
this->Output.clear();
break;
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 4d98d55..1a25633 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -196,7 +196,7 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string& config,
std::string outputFilename(this->GetOutputFilename(config));
if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) {
- std::string const static_library_suffix =
+ std::string const& static_library_suffix =
this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
*this->GetFolderBuildStreams()
<< " -o \"" << outputDir << outputFilename << static_library_suffix
@@ -478,10 +478,9 @@ void cmGhsMultiTargetGenerator::WriteSources(
std::vector<cmSourceFile*> const& objectSources,
std::map<const cmSourceFile*, std::string> const& objectNames)
{
- for (std::vector<cmSourceFile*>::const_iterator si = objectSources.begin();
- si != objectSources.end(); ++si) {
+ for (const cmSourceFile* sf : objectSources) {
std::vector<cmSourceGroup> sourceGroups(this->Makefile->GetSourceGroups());
- std::string const& sourceFullPath = (*si)->GetFullPath();
+ std::string const& sourceFullPath = sf->GetFullPath();
cmSourceGroup* sourceGroup =
this->Makefile->FindSourceGroup(sourceFullPath, sourceGroups);
std::string sgPath = sourceGroup->GetFullName();
@@ -491,8 +490,8 @@ void cmGhsMultiTargetGenerator::WriteSources(
this->LocalGenerator->GetBinaryDirectory().c_str(), sgPath,
GhsMultiGpj::SUBPROJECT, this->RelBuildFilePath);
- std::string fullSourcePath((*si)->GetFullPath());
- if ((*si)->GetExtension() == "int" || (*si)->GetExtension() == "bsp") {
+ std::string fullSourcePath(sf->GetFullPath());
+ if (sf->GetExtension() == "int" || sf->GetExtension() == "bsp") {
*this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl;
} else {
// WORKAROUND: GHS MULTI needs the path to use backslashes without quotes
@@ -501,12 +500,12 @@ void cmGhsMultiTargetGenerator::WriteSources(
*this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl;
}
- if ("ld" != (*si)->GetExtension() && "int" != (*si)->GetExtension() &&
- "bsp" != (*si)->GetExtension()) {
- this->WriteObjectLangOverride(this->FolderBuildStreams[sgPath], (*si));
- if (objectNames.end() != objectNames.find(*si)) {
+ if ("ld" != sf->GetExtension() && "int" != sf->GetExtension() &&
+ "bsp" != sf->GetExtension()) {
+ this->WriteObjectLangOverride(this->FolderBuildStreams[sgPath], sf);
+ if (objectNames.end() != objectNames.find(sf)) {
*this->FolderBuildStreams[sgPath]
- << " -o \"" << objectNames.find(*si)->second << "\"" << std::endl;
+ << " -o \"" << objectNames.find(sf)->second << "\"" << std::endl;
}
this->WriteObjectDir(this->FolderBuildStreams[sgPath],
@@ -516,7 +515,7 @@ void cmGhsMultiTargetGenerator::WriteSources(
}
void cmGhsMultiTargetGenerator::WriteObjectLangOverride(
- cmGeneratedFileStream* fileStream, cmSourceFile* sourceFile)
+ cmGeneratedFileStream* fileStream, const cmSourceFile* sourceFile)
{
const char* rawLangProp = sourceFile->GetProperty("LANGUAGE");
if (NULL != rawLangProp) {
diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h
index 2cdf68e..e936b08 100644
--- a/Source/cmGhsMultiTargetGenerator.h
+++ b/Source/cmGhsMultiTargetGenerator.h
@@ -86,7 +86,7 @@ private:
cmLocalGhsMultiGenerator* localGhsMultiGenerator,
cmGeneratorTarget* generatorTarget);
static void WriteObjectLangOverride(cmGeneratedFileStream* fileStream,
- cmSourceFile* sourceFile);
+ const cmSourceFile* sourceFile);
static void WriteObjectDir(cmGeneratedFileStream* fileStream,
std::string const& dir);
std::string GetOutputDirectory(const std::string& config) const;
-----------------------------------------------------------------------
Summary of changes:
Source/cmExtraCodeLiteGenerator.cxx | 15 +++++++--------
Source/cmGeneratorExpression.cxx | 13 ++++---------
Source/cmGhsMultiTargetGenerator.cxx | 23 +++++++++++------------
Source/cmGhsMultiTargetGenerator.h | 2 +-
4 files changed, 23 insertions(+), 30 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list