[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3013-gc5b6308
Stephen Kelly
steveire at gmail.com
Wed Jul 10 09:56:37 EDT 2013
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 c5b6308b09855cc7b28d18f726e1bec02a551e00 (commit)
via b9419a26a24c86a34c16603e0dab34e484229f36 (commit)
via 8e839ee9f6e96f4769a079be417b4c432cdb8061 (commit)
via 800a39ba606ada1727e6d8b5c0929fb3ed1a7d75 (commit)
via 0b165dc81fd983e7b83c3e9c2137f1e7f6df69db (commit)
from f747145375ca81ca4cc23f4baa235196f14537a2 (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=c5b6308b09855cc7b28d18f726e1bec02a551e00
commit c5b6308b09855cc7b28d18f726e1bec02a551e00
Merge: f747145 b9419a2
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jul 10 09:56:33 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jul 10 09:56:33 2013 -0400
Merge topic 'compile-defs-debugging' into next
b9419a2 Refactor to create AddCompileDefinitions.
8e839ee Use new cmIDEOptions::AddDefines overload in the VS generator.
800a39b Add an overload of cmIDEOptions::AddDefines taking a vector of strings.
0b165dc Revert "Add a hack to workaround handling of escaped semicolons."
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9419a26a24c86a34c16603e0dab34e484229f36
commit b9419a26a24c86a34c16603e0dab34e484229f36
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jul 10 15:50:21 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jul 10 15:50:21 2013 +0200
Refactor to create AddCompileDefinitions.
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index b0003c9..d925432 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -463,9 +463,7 @@ ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target,
}
// Add preprocessor definitions for this target and configuration.
- std::vector<std::string> targetDefs;
- target->GetCompileDefinitions(targetDefs, config);
- lg->AppendDefines(defines, targetDefs);
+ lg->AddCompileDefinitions(defines, target, config);
lg->AppendDefines(defines, source->GetProperty("COMPILE_DEFINITIONS"));
{
std::string defPropName = "COMPILE_DEFINITIONS_";
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 63de1a5..91753d5 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1741,9 +1741,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
this->AppendDefines(ppDefs, exportMacro);
}
cmGeneratorTarget *gtgt = this->GetGeneratorTarget(&target);
- std::vector<std::string> targetDefines;
- target.GetCompileDefinitions(targetDefines, configName);
- this->AppendDefines(ppDefs, targetDefines);
+ this->CurrentLocalGenerator->AddCompileDefinitions(ppDefs,
+ &target, configName);
buildSettings->AddAttribute
("GCC_PREPROCESSOR_DEFINITIONS", ppDefs.CreateList());
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 70d7d16..d5edfa1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1338,6 +1338,28 @@ std::string cmLocalGenerator::GetIncludeFlags(
return flags;
}
+// //----------------------------------------------------------------------------
+// void cmLocalGenerator::AddCompileDefinitions(std::string& defines,
+// cmTarget* target,
+// const char* config)
+// {
+// std::vector<std::string> targetDefines;
+// target->GetCompileDefinitions(targetDefines,
+// config);
+// this->AppendDefines(defines, targetDefines);
+// }
+
+//----------------------------------------------------------------------------
+void cmLocalGenerator::AddCompileDefinitions(std::set<std::string>& defines,
+ cmTarget* target,
+ const char* config)
+{
+ std::vector<std::string> targetDefines;
+ target->GetCompileDefinitions(targetDefines,
+ config);
+ this->AppendDefines(defines, targetDefines);
+}
+
//----------------------------------------------------------------------------
void cmLocalGenerator::AddCompileOptions(
std::string& flags, cmTarget* target,
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index f5cd7fd..0547ce9 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -223,6 +223,10 @@ public:
bool stripImplicitInclDirs = true);
void AddCompileOptions(std::string& flags, cmTarget* target,
const char* lang, const char* config);
+// void AddCompileDefinitions(std::string& defines, cmTarget* target,
+// const char* config);
+ void AddCompileDefinitions(std::set<std::string>& defines, cmTarget* target,
+ const char* config);
/** Compute the language used to compile the given source file. */
const char* GetSourceFileLanguage(const cmSourceFile& source);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index a8a7419..1d1acfd 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1962,10 +1962,8 @@ void cmLocalUnixMakefileGenerator3
// Build a list of preprocessor definitions for the target.
std::set<std::string> defines;
- std::vector<std::string> targetDefines;
- target.GetCompileDefinitions(targetDefines,
+ this->AddCompileDefinitions(defines, &target,
this->ConfigurationName.c_str());
- this->AppendDefines(defines, targetDefines);
if(!defines.empty())
{
cmakefileStream
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 6421cf6..df6e1f1 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1701,31 +1701,11 @@ void cmLocalVisualStudio6Generator
std::set<std::string> minsizeDefinesSet;
std::set<std::string> debugrelDefinesSet;
- {
- std::vector<std::string> targetDefines;
- target.GetCompileDefinitions(targetDefines, 0);
- this->AppendDefines(definesSet, targetDefines);
- }
- {
- std::vector<std::string> targetDefines;
- target.GetCompileDefinitions(targetDefines, "DEBUG");
- this->AppendDefines(debugDefinesSet, targetDefines);
- }
- {
- std::vector<std::string> targetDefines;
- target.GetCompileDefinitions(targetDefines, "RELEASE");
- this->AppendDefines(releaseDefinesSet, targetDefines);
- }
- {
- std::vector<std::string> targetDefines;
- target.GetCompileDefinitions(targetDefines, "MINSIZEREL");
- this->AppendDefines(minsizeDefinesSet, targetDefines);
- }
- {
- std::vector<std::string> targetDefines;
- target.GetCompileDefinitions(targetDefines, "RELWITHDEBINFO");
- this->AppendDefines(debugrelDefinesSet, targetDefines);
- }
+ this->AddCompileDefinitions(definesSet, &target, 0);
+ this->AddCompileDefinitions(debugDefinesSet, &target, "DEBUG");
+ this->AddCompileDefinitions(releaseDefinesSet, &target, "RELEASE");
+ this->AddCompileDefinitions(minsizeDefinesSet, &target, "MINSIZEREL");
+ this->AddCompileDefinitions(debugrelDefinesSet, &target, "RELWITHDEBINFO");
std::string defines = " ";
std::string debugDefines = " ";
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 6b31c91..9ecd53d 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -748,17 +748,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
this->GlobalGenerator->GetGeneratorTarget(&target);
std::vector<std::string> targetDefines;
target.GetCompileDefinitions(targetDefines, configName);
- std::string targetDefinesString = "";
- const char *sep = "";
- for(std::vector<std::string>::const_iterator defIt = targetDefines.begin();
- defIt != targetDefines.end();
- ++defIt)
- {
- targetDefinesString += sep;
- sep = ";";
- targetDefinesString += *defIt;
- }
- targetOptions.AddDefines(targetDefinesString.c_str());
+ targetOptions.AddDefines(targetDefines);
targetOptions.SetVerboseMakefile(
this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"));
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index fa09cb7..b19d37d 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -309,10 +309,8 @@ std::string cmMakefileTargetGenerator::GetDefines(const std::string &l)
}
// Add preprocessor definitions for this target and configuration.
- std::vector<std::string> targetDefines;
- this->Target->GetCompileDefinitions(targetDefines,
+ this->LocalGenerator->AddCompileDefinitions(defines, this->Target,
this->LocalGenerator->ConfigurationName.c_str());
- this->LocalGenerator->AppendDefines(defines, targetDefines);
std::string definesString;
this->LocalGenerator->JoinDefines(defines, definesString, lang);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index c447235..88ab727 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -201,9 +201,8 @@ ComputeDefines(cmSourceFile *source, const std::string& language)
}
// Add preprocessor definitions for this target and configuration.
- std::vector<std::string> targetDefines;
- this->Target->GetCompileDefinitions(targetDefines, this->GetConfigName());
- this->LocalGenerator->AppendDefines(defines, targetDefines);
+ this->LocalGenerator->AddCompileDefinitions(defines, this->Target,
+ this->GetConfigName());
this->LocalGenerator->AppendDefines
(defines,
source->GetProperty("COMPILE_DEFINITIONS"));
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 2a7df86..93e39ab 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -176,9 +176,7 @@ static void GetCompileDefinitionsAndDirectories(cmTarget *target,
}
std::set<std::string> defines;
- std::vector<std::string> targetDefines;
- target->GetCompileDefinitions(targetDefines, config);
- localGen->AppendDefines(defines, targetDefines);
+ localGen->AddCompileDefinitions(defines, target, config);
sep = "";
for(std::set<std::string>::const_iterator defIt = defines.begin();
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e839ee9f6e96f4769a079be417b4c432cdb8061
commit 8e839ee9f6e96f4769a079be417b4c432cdb8061
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jul 10 15:23:29 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jul 10 15:23:29 2013 +0200
Use new cmIDEOptions::AddDefines overload in the VS generator.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 5881e03..d59de11 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1339,17 +1339,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
clOptions.Parse(defineFlags.c_str());
std::vector<std::string> targetDefines;
this->Target->GetCompileDefinitions(targetDefines, configName.c_str());
- std::string targetDefinesString = "";
- const char *sep = "";
- for(std::vector<std::string>::const_iterator defIt = targetDefines.begin();
- defIt != targetDefines.end();
- ++defIt)
- {
- targetDefinesString += sep;
- sep = ";";
- targetDefinesString += *defIt;
- }
- clOptions.AddDefines(targetDefinesString.c_str());
+ clOptions.AddDefines(targetDefines);
clOptions.SetVerboseMakefile(
this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"));
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=800a39ba606ada1727e6d8b5c0929fb3ed1a7d75
commit 800a39ba606ada1727e6d8b5c0929fb3ed1a7d75
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jul 10 15:22:59 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jul 10 15:22:59 2013 +0200
Add an overload of cmIDEOptions::AddDefines taking a vector of strings.
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index 76a60cf..34a9c7c 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -165,6 +165,11 @@ void cmIDEOptions::AddDefines(const char* defines)
cmSystemTools::ExpandListArgument(defines, this->Defines);
}
}
+//----------------------------------------------------------------------------
+void cmIDEOptions::AddDefines(const std::vector<std::string> &defines)
+{
+ this->Defines.insert(this->Defines.end(), defines.begin(), defines.end());
+}
//----------------------------------------------------------------------------
void cmIDEOptions::AddFlag(const char* flag, const char* value)
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h
index e556bde..e78af3e 100644
--- a/Source/cmIDEOptions.h
+++ b/Source/cmIDEOptions.h
@@ -27,6 +27,7 @@ public:
// Store definitions and flags.
void AddDefine(const std::string& define);
void AddDefines(const char* defines);
+ void AddDefines(const std::vector<std::string> &defines);
void AddFlag(const char* flag, const char* value);
void RemoveFlag(const char* flag);
const char* GetFlag(const char* flag);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b165dc81fd983e7b83c3e9c2137f1e7f6df69db
commit 0b165dc81fd983e7b83c3e9c2137f1e7f6df69db
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jul 10 15:22:51 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jul 10 15:22:51 2013 +0200
Revert "Add a hack to workaround handling of escaped semicolons."
This reverts commit fc5300a355ff27875cbf1c2578c3b2bed6a8f538.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0f9e726..affe417 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3284,36 +3284,12 @@ static void processCompileOptionsInternal(cmTarget *tgt,
std::vector<std::string> entryOptions = (*it)->CachedEntries;
if(entryOptions.empty())
{
- std::string result = (*it)->ge->Evaluate(mf,
+ cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
config,
false,
tgt,
- dagChecker);
-
- std::vector<std::string> list;
- {
- size_t pos = 0;
- while((pos = result.find("\\;", pos)) != std::string::npos)
- {
- result.replace(pos, 2, "<SEMICOLON>");
- pos += 11;
- }
- }
- cmSystemTools::ExpandListArgument(result, list);
- for (std::vector<std::string>::const_iterator it2 = list.begin();
- it2 != list.end(); ++it2)
- {
- std::string item = *it2;
- {
- size_t pos = 0;
- while((pos = item.find("<SEMICOLON>", pos)) != std::string::npos)
- {
- item.replace(pos, 11, ";");
- pos += 2;
- }
- }
- entryOptions.push_back(item);
- }
+ dagChecker),
+ entryOptions);
if (mf->IsGeneratingBuildSystem()
&& !(*it)->ge->GetHadContextSensitiveCondition())
{
-----------------------------------------------------------------------
Summary of changes:
Source/cmExtraSublimeTextGenerator.cxx | 4 +--
Source/cmGlobalXCodeGenerator.cxx | 5 +--
Source/cmIDEOptions.cxx | 5 ++++
Source/cmIDEOptions.h | 1 +
Source/cmLocalGenerator.cxx | 22 ++++++++++++++++++++
Source/cmLocalGenerator.h | 4 +++
Source/cmLocalUnixMakefileGenerator3.cxx | 4 +--
Source/cmLocalVisualStudio6Generator.cxx | 30 ++++-----------------------
Source/cmLocalVisualStudio7Generator.cxx | 12 +----------
Source/cmMakefileTargetGenerator.cxx | 4 +--
Source/cmNinjaTargetGenerator.cxx | 5 +--
Source/cmQtAutomoc.cxx | 4 +--
Source/cmTarget.cxx | 30 ++-------------------------
Source/cmVisualStudio10TargetGenerator.cxx | 12 +----------
14 files changed, 50 insertions(+), 92 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list