Merge topic 'ninja-no-static-lib-def-file'

47ffa0ea Ninja: Do not use module definition `.def` files for static libraries
This commit is contained in:
Brad King 2017-01-16 11:01:14 -05:00 committed by CMake Topic Stage
commit 94332a3ed8

View File

@ -63,6 +63,13 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags,
void cmCommonTargetGenerator::AddModuleDefinitionFlag(
cmLinkLineComputer* linkLineComputer, std::string& flags)
{
// A module definition file only makes sense on certain target types.
if (this->GeneratorTarget->GetType() != cmStateEnums::SHARED_LIBRARY &&
this->GeneratorTarget->GetType() != cmStateEnums::MODULE_LIBRARY &&
this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE) {
return;
}
if (!this->ModuleDefinitionFile) {
return;
}