cmDyndepCollation: add a query for whether an object is BMI-only

The collator needs to know that the object *is* a BMI so that it can
just use the location directly.
stage/master/nightly/2023/08/19
Ben Boeckel 2023-02-07 17:57:16 -05:00
parent 9840bfdab0
commit a53748e319
2 changed files with 16 additions and 0 deletions

View File

@ -666,3 +666,16 @@ bool cmDyndepCollation::IsObjectPrivate(
auto const& file_set = fileset_info_itr->second;
return !cmFileSetVisibilityIsForInterface(file_set.Visibility);
}
bool cmDyndepCollation::IsBmiOnly(cmCxxModuleExportInfo const& exportInfo,
std::string const& object)
{
#ifdef _WIN32
auto object_path = object;
cmSystemTools::ConvertToUnixSlashes(object_path);
#else
auto const& object_path = object;
#endif
auto fs = exportInfo.ObjectToFileSet.find(object_path);
return (fs != exportInfo.ObjectToFileSet.end()) && fs->second.BmiOnly;
}

View File

@ -53,4 +53,7 @@ struct cmDyndepCollation
cmDyndepMetadataCallbacks const& cb);
static bool IsObjectPrivate(std::string const& object,
cmCxxModuleExportInfo const& export_info);
static bool IsBmiOnly(cmCxxModuleExportInfo const& exportInfo,
std::string const& object);
};