Commit 24853afa authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'stringapi-crash-cleanup'

c491cb1e Fix some generator crashes on undefined CMAKE_BUILD_TYPE
parents 8766f8ef c491cb1e
......@@ -574,7 +574,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
}
}
const char* buildType = makefile->GetDefinition("CMAKE_BUILD_TYPE");
std::string buildType = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
std::string location;
if ( target->GetType()==cmTarget::OBJECT_LIBRARY)
{
......
......@@ -968,7 +968,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
continue;
}
std::vector<std::string> includeDirs;
const char *config = mf->GetDefinition("CMAKE_BUILD_TYPE");
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
(*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);
this->AppendIncludeDirectories(fout, includeDirs, emmited);
}
......
......@@ -1861,7 +1861,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
((useWatcomQuote) ? WATCOMQUOTE : SHELL);
bool escapeAllowMakeVars = !forResponseFile;
cmOStringStream fout;
const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
cmComputeLinkInformation* pcli = tgt.Target->GetLinkInformation(config);
if(!pcli)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment