BUG: Fix crash when CMAKE_BACKWARDS_COMPATIBILITY is not set.
This commit is contained in:
parent
cd4d2acbe6
commit
53e0ed3273
@ -464,9 +464,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
// backwards compatibility files they have to load
|
// backwards compatibility files they have to load
|
||||||
// These files have a bunch of try compiles in them so
|
// These files have a bunch of try compiles in them so
|
||||||
// should only be done
|
// should only be done
|
||||||
const char* versionValue
|
if (mf->NeedBackwardsCompatibility(1,4))
|
||||||
= mf->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
|
|
||||||
if (atof(versionValue) <= 1.4)
|
|
||||||
{
|
{
|
||||||
if(strcmp(lang, "C") == 0)
|
if(strcmp(lang, "C") == 0)
|
||||||
{
|
{
|
||||||
|
@ -50,11 +50,9 @@ bool cmIncludeDirectoryCommand
|
|||||||
}
|
}
|
||||||
if(i->size() == 0)
|
if(i->size() == 0)
|
||||||
{
|
{
|
||||||
const char* versionValue =
|
|
||||||
this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
|
|
||||||
const char* errorMessage
|
const char* errorMessage
|
||||||
= "Empty Include Directory Passed into INCLUDE_DIRECTORIES command.";
|
= "Empty Include Directory Passed into INCLUDE_DIRECTORIES command.";
|
||||||
if(atof(versionValue) < 2.5)
|
if(this->Makefile->NeedBackwardsCompatibility(2,4))
|
||||||
{
|
{
|
||||||
cmSystemTools::Error(errorMessage);
|
cmSystemTools::Error(errorMessage);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user