cmTarget: Fix buildsystem property empty value set and append operations
Refactoring in commit1f54bc1c
(cmTarget: Split storage of include directories from genexes, 2015-08-04), commit772ecef4
(cmTarget: Split storage of compile options from genexes, 2015-08-04), commit44e071ae
(cmTarget: Split storage of compile features from genexes, 2015-08-04), and commit197f4de1
(cmTarget: Split storage of compile definitions from genexes, 2015-08-04) failed to account for value==NULL in SetProperty and AppendProperty methods.
This commit is contained in:
parent
e7777cc563
commit
cf74fc24d4
|
@ -1601,34 +1601,46 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
|
|||
{
|
||||
this->Internal->IncludeDirectoriesEntries.clear();
|
||||
this->Internal->IncludeDirectoriesBacktraces.clear();
|
||||
if (value)
|
||||
{
|
||||
this->Internal->IncludeDirectoriesEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "COMPILE_OPTIONS")
|
||||
{
|
||||
this->Internal->CompileOptionsEntries.clear();
|
||||
this->Internal->CompileOptionsBacktraces.clear();
|
||||
if (value)
|
||||
{
|
||||
this->Internal->CompileOptionsEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->CompileOptionsBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "COMPILE_FEATURES")
|
||||
{
|
||||
this->Internal->CompileFeaturesEntries.clear();
|
||||
this->Internal->CompileFeaturesBacktraces.clear();
|
||||
if (value)
|
||||
{
|
||||
this->Internal->CompileFeaturesEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "COMPILE_DEFINITIONS")
|
||||
{
|
||||
this->Internal->CompileDefinitionsEntries.clear();
|
||||
this->Internal->CompileDefinitionsBacktraces.clear();
|
||||
if (value)
|
||||
{
|
||||
this->Internal->CompileDefinitionsEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "EXPORT_NAME" && this->IsImported())
|
||||
{
|
||||
std::ostringstream e;
|
||||
|
@ -1692,29 +1704,41 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
|
|||
return;
|
||||
}
|
||||
else if(prop == "INCLUDE_DIRECTORIES")
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
this->Internal->IncludeDirectoriesEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "COMPILE_OPTIONS")
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
this->Internal->CompileOptionsEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->CompileOptionsBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "COMPILE_FEATURES")
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
this->Internal->CompileFeaturesEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "COMPILE_DEFINITIONS")
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
this->Internal->CompileDefinitionsEntries.push_back(value);
|
||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||
this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
|
||||
}
|
||||
}
|
||||
else if(prop == "EXPORT_NAME" && this->IsImported())
|
||||
{
|
||||
std::ostringstream e;
|
||||
|
|
Loading…
Reference in New Issue