diff options
Diffstat (limited to 'Source/cmDyndepCollation.h')
-rw-r--r-- | Source/cmDyndepCollation.h | 50 |
1 files changed, 12 insertions, 38 deletions
diff --git a/Source/cmDyndepCollation.h b/Source/cmDyndepCollation.h index 5f78707..e70ac09 100644 --- a/Source/cmDyndepCollation.h +++ b/Source/cmDyndepCollation.h @@ -5,16 +5,14 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <functional> -#include <map> #include <memory> #include <string> #include <vector> #include <cm/optional> -#include "cmFileSet.h" - class cmGeneratorTarget; +struct cmScanDepInfo; class cmSourceFile; namespace Json { @@ -27,43 +25,15 @@ struct cmDyndepGeneratorCallbacks ObjectFilePath; }; -struct CxxModuleFileSet -{ - std::string Name; - std::string RelativeDirectory; - std::string SourcePath; - std::string Type; - cmFileSetVisibility Visibility; - cm::optional<std::string> Destination; -}; - -struct CxxModuleBmiInstall -{ - std::string Component; - std::string Destination; - bool ExcludeFromAll; - bool Optional; - std::string Permissions; - std::string MessageLevel; - std::string ScriptLocation; -}; - -struct CxxModuleExport +struct cmDyndepMetadataCallbacks { - std::string Name; - std::string Destination; - std::string Prefix; - std::string CxxModuleInfoDir; - std::string Namespace; - bool Install; + std::function<cm::optional<std::string>(std::string const& name)> ModuleFile; }; -struct cmCxxModuleExportInfo +struct cmCxxModuleExportInfo; +struct cmCxxModuleExportInfoDeleter { - std::map<std::string, CxxModuleFileSet> ObjectToFileSet; - cm::optional<CxxModuleBmiInstall> BmiInstallation; - std::vector<CxxModuleExport> Exports; - std::string Config; + void operator()(cmCxxModuleExportInfo* ei) const; }; struct cmDyndepCollation @@ -73,6 +43,10 @@ struct cmDyndepCollation std::string const& config, cmDyndepGeneratorCallbacks const& cb); - static std::unique_ptr<cmCxxModuleExportInfo> ParseExportInfo( - Json::Value const& tdi); + static std::unique_ptr<cmCxxModuleExportInfo, cmCxxModuleExportInfoDeleter> + ParseExportInfo(Json::Value const& tdi); + static bool WriteDyndepMetadata(std::string const& lang, + std::vector<cmScanDepInfo> const& objects, + cmCxxModuleExportInfo const& export_info, + cmDyndepMetadataCallbacks const& cb); }; |