diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-02-07 22:57:16 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-08-17 18:42:53 (GMT) |
commit | a53748e31906b5821f3aedeb848ac53dcdd6389d (patch) | |
tree | fb88bf0a01e74b76d451f796ee517038d66078f5 /Source | |
parent | 9840bfdab0542fdbecc3787fb6cad9f4fb861519 (diff) | |
download | CMake-a53748e31906b5821f3aedeb848ac53dcdd6389d.zip CMake-a53748e31906b5821f3aedeb848ac53dcdd6389d.tar.gz CMake-a53748e31906b5821f3aedeb848ac53dcdd6389d.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmDyndepCollation.cxx | 13 | ||||
-rw-r--r-- | Source/cmDyndepCollation.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmDyndepCollation.cxx b/Source/cmDyndepCollation.cxx index bdf6b44..bd2f546 100644 --- a/Source/cmDyndepCollation.cxx +++ b/Source/cmDyndepCollation.cxx @@ -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; +} diff --git a/Source/cmDyndepCollation.h b/Source/cmDyndepCollation.h index 21f1fe9..b193467 100644 --- a/Source/cmDyndepCollation.h +++ b/Source/cmDyndepCollation.h @@ -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); }; |