XCode generation should fail if lang isn't known
This commit is contained in:
parent
d3a89432fd
commit
96a335fd8d
|
@ -1424,6 +1424,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||||
std::string defFlags;
|
std::string defFlags;
|
||||||
bool shared = ((target.GetType() == cmTarget::SHARED_LIBRARY) ||
|
bool shared = ((target.GetType() == cmTarget::SHARED_LIBRARY) ||
|
||||||
(target.GetType() == cmTarget::MODULE_LIBRARY));
|
(target.GetType() == cmTarget::MODULE_LIBRARY));
|
||||||
|
bool binary = ((target.GetType() == cmTarget::STATIC_LIBRARY) ||
|
||||||
|
(target.GetType() == cmTarget::EXECUTABLE) ||
|
||||||
|
shared);
|
||||||
|
|
||||||
const char* lang = target.GetLinkerLanguage(configName);
|
const char* lang = target.GetLinkerLanguage(configName);
|
||||||
std::string cflags;
|
std::string cflags;
|
||||||
|
@ -1442,6 +1445,13 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||||
// Add shared-library flags if needed.
|
// Add shared-library flags if needed.
|
||||||
this->CurrentLocalGenerator->AddSharedFlags(flags, lang, shared);
|
this->CurrentLocalGenerator->AddSharedFlags(flags, lang, shared);
|
||||||
}
|
}
|
||||||
|
else if(binary)
|
||||||
|
{
|
||||||
|
cmSystemTools::Error
|
||||||
|
("CMake can not determine linker language for target:",
|
||||||
|
target.GetName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Add define flags
|
// Add define flags
|
||||||
this->CurrentLocalGenerator->
|
this->CurrentLocalGenerator->
|
||||||
|
|
Loading…
Reference in New Issue