mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
Return a std::string from GetCompileDefinitions.
This commit is contained in:
parent
b7e48e0acb
commit
2c2b25b203
@ -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)
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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());
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user