Merge topic 'no-source-language-crash'
2c2fbaf Do not crash on unknown source language (#13323)
This commit is contained in:
commit
e5ebb77405
@ -2864,12 +2864,15 @@ cmLocalGenerator
|
|||||||
// compatibility do this by default.
|
// compatibility do this by default.
|
||||||
bool replaceExt = this->NeedBackwardsCompatibility(2, 4);
|
bool replaceExt = this->NeedBackwardsCompatibility(2, 4);
|
||||||
if(!replaceExt)
|
if(!replaceExt)
|
||||||
|
{
|
||||||
|
if(const char* lang = source.GetLanguage())
|
||||||
{
|
{
|
||||||
std::string repVar = "CMAKE_";
|
std::string repVar = "CMAKE_";
|
||||||
repVar += source.GetLanguage();
|
repVar += lang;
|
||||||
repVar += "_OUTPUT_EXTENSION_REPLACE";
|
repVar += "_OUTPUT_EXTENSION_REPLACE";
|
||||||
replaceExt = this->Makefile->IsOn(repVar.c_str());
|
replaceExt = this->Makefile->IsOn(repVar.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the source extension if it is to be replaced.
|
// Remove the source extension if it is to be replaced.
|
||||||
if(replaceExt)
|
if(replaceExt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user