diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-20 21:25:27 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-09-21 11:28:54 (GMT) |
commit | 2c2b25b203e653326c0f4064649da06a8cdfd7a5 (patch) | |
tree | 1b240dfbc8bc5e573495d183b2600026850a65aa | |
parent | b7e48e0acbd0cd30f803ec8c2d402c636beba778 (diff) | |
download | CMake-2c2b25b203e653326c0f4064649da06a8cdfd7a5.zip CMake-2c2b25b203e653326c0f4064649da06a8cdfd7a5.tar.gz CMake-2c2b25b203e653326c0f4064649da06a8cdfd7a5.tar.bz2 |
Return a std::string from GetCompileDefinitions.
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 2 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.h | 2 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 4 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 5 |
5 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ec83b7a..f8c274a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -314,7 +314,7 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories() } //---------------------------------------------------------------------------- -const char *cmGeneratorTarget::GetCompileDefinitions(const char *config) +std::string cmGeneratorTarget::GetCompileDefinitions(const char *config) { if (!config) { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 4487c11..8ea17d7 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -74,7 +74,7 @@ public: /** Get the include directories for this target. */ std::vector<std::string> GetIncludeDirectories(); - const char *GetCompileDefinitions(const char *config = 0); + std::string GetCompileDefinitions(const char *config = 0); private: void ClassifySources(); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index a270cc9..2f4311f 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1648,10 +1648,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, this->AppendDefines(ppDefs, exportMacro); } cmGeneratorTarget *gtgt = this->GetGeneratorTarget(&target); - this->AppendDefines(ppDefs, gtgt->GetCompileDefinitions()); + this->AppendDefines(ppDefs, gtgt->GetCompileDefinitions().c_str()); if(configName) { - this->AppendDefines(ppDefs, gtgt->GetCompileDefinitions(configName)); + this->AppendDefines(ppDefs, + gtgt->GetCompileDefinitions(configName).c_str()); } buildSettings->AddAttribute ("GCC_PREPROCESSOR_DEFINITIONS", ppDefs.CreateList()); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 71c1647..11d9d9c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -742,8 +742,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, targetOptions.ParseFinish(); cmGeneratorTarget* gt = this->GlobalGenerator->GetGeneratorTarget(&target); - targetOptions.AddDefines(gt->GetCompileDefinitions()); - targetOptions.AddDefines(gt->GetCompileDefinitions(configName)); + targetOptions.AddDefines(gt->GetCompileDefinitions().c_str()); + targetOptions.AddDefines(gt->GetCompileDefinitions(configName).c_str()); targetOptions.SetVerboseMakefile( this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 87312ae..90718ab 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1231,9 +1231,10 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.AddFlag("PrecompiledHeader", "NotUsing"); clOptions.Parse(flags.c_str()); clOptions.Parse(defineFlags.c_str()); - clOptions.AddDefines(this->GeneratorTarget->GetCompileDefinitions()); + clOptions.AddDefines( + this->GeneratorTarget->GetCompileDefinitions().c_str()); clOptions.AddDefines(this->GeneratorTarget->GetCompileDefinitions( - configName.c_str())); + configName.c_str()).c_str()); clOptions.SetVerboseMakefile( this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")); |