Merge topic 'ninja-generated-def'
3fd0dde
Merge branch 'test-generated-def' into ninja-generated-defd2c764a
Ninja: Fix module .def file path conversion
This commit is contained in:
commit
046f0f869e
|
@ -236,9 +236,9 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
|
||||||
std::transform(deps.begin(), deps.end(), result.begin(), MapToNinjaPath());
|
std::transform(deps.begin(), deps.end(), result.begin(), MapToNinjaPath());
|
||||||
|
|
||||||
// Add a dependency on the link definitions file, if any.
|
// Add a dependency on the link definitions file, if any.
|
||||||
if(!this->GeneratorTarget->ModuleDefinitionFile.empty())
|
if(!this->ModuleDefinitionFile.empty())
|
||||||
{
|
{
|
||||||
result.push_back(this->GeneratorTarget->ModuleDefinitionFile);
|
result.push_back(this->ModuleDefinitionFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -409,6 +409,11 @@ cmNinjaTargetGenerator
|
||||||
{
|
{
|
||||||
this->WriteObjectBuildStatement(*si);
|
this->WriteObjectBuildStatement(*si);
|
||||||
}
|
}
|
||||||
|
if(!this->GeneratorTarget->ModuleDefinitionFile.empty())
|
||||||
|
{
|
||||||
|
this->ModuleDefinitionFile = this->ConvertToNinjaPath(
|
||||||
|
this->GeneratorTarget->ModuleDefinitionFile.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Add object library contents as external objects.
|
// Add object library contents as external objects.
|
||||||
|
@ -509,7 +514,7 @@ void
|
||||||
cmNinjaTargetGenerator
|
cmNinjaTargetGenerator
|
||||||
::AddModuleDefinitionFlag(std::string& flags)
|
::AddModuleDefinitionFlag(std::string& flags)
|
||||||
{
|
{
|
||||||
if(this->GeneratorTarget->ModuleDefinitionFile.empty())
|
if(this->ModuleDefinitionFile.empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -526,6 +531,6 @@ cmNinjaTargetGenerator
|
||||||
// vs6's "cl -link" pass it to the linker.
|
// vs6's "cl -link" pass it to the linker.
|
||||||
std::string flag = defFileFlag;
|
std::string flag = defFileFlag;
|
||||||
flag += (this->LocalGenerator->ConvertToLinkReference(
|
flag += (this->LocalGenerator->ConvertToLinkReference(
|
||||||
this->GeneratorTarget->ModuleDefinitionFile.c_str()));
|
this->ModuleDefinitionFile.c_str()));
|
||||||
this->LocalGenerator->AppendFlags(flags, flag.c_str());
|
this->LocalGenerator->AppendFlags(flags, flag.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,9 @@ private:
|
||||||
cmLocalNinjaGenerator* LocalGenerator;
|
cmLocalNinjaGenerator* LocalGenerator;
|
||||||
/// List of object files for this target.
|
/// List of object files for this target.
|
||||||
cmNinjaDeps Objects;
|
cmNinjaDeps Objects;
|
||||||
|
|
||||||
|
// The windows module definition source file (.def), if any.
|
||||||
|
std::string ModuleDefinitionFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ! cmNinjaTargetGenerator_h
|
#endif // ! cmNinjaTargetGenerator_h
|
||||||
|
|
Loading…
Reference in New Issue