1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
12 #include "cmExportFileGenerator.h"
15 class cmGeneratorTarget;
16 class cmGlobalGenerator;
20 class cmExportTryCompileFileGenerator : public cmExportFileGenerator
23 cmExportTryCompileFileGenerator(cmGlobalGenerator* gg,
24 std::vector<std::string> const& targets,
26 std::set<std::string> const& langs);
28 /** Set the list of targets to export. */
29 void SetConfig(const std::string& config) { this->Config = config; }
32 // Implement virtual methods from the superclass.
33 bool GenerateMainFile(std::ostream& os) override;
35 void GenerateImportTargetsConfig(std::ostream&, const std::string&,
36 std::string const&) override
39 void HandleMissingTarget(std::string&, cmGeneratorTarget const*,
40 cmGeneratorTarget*) override
44 void PopulateProperties(cmGeneratorTarget const* target,
45 ImportPropertyMap& properties,
46 std::set<const cmGeneratorTarget*>& emitted);
48 std::string InstallNameDir(cmGeneratorTarget const* target,
49 const std::string& config) override;
51 std::string GetFileSetDirectories(cmGeneratorTarget* target,
53 cmTargetExport* te) override;
55 std::string GetFileSetFiles(cmGeneratorTarget* target, cmFileSet* fileSet,
56 cmTargetExport* te) override;
58 std::string GetCxxModulesDirectory() const override { return {}; }
59 void GenerateCxxModuleConfigInformation(std::ostream&) const override {}
62 std::string FindTargets(const std::string& prop,
63 const cmGeneratorTarget* tgt,
64 std::string const& language,
65 std::set<const cmGeneratorTarget*>& emitted);
67 std::vector<cmGeneratorTarget const*> Exports;
69 std::vector<std::string> Languages;