/src/CMake/Source/cmExportTryCompileFileGenerator.h
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst or https://cmake.org/licensing for details. */ |
3 | | #pragma once |
4 | | |
5 | | #include "cmConfigure.h" // IWYU pragma: keep |
6 | | |
7 | | #include <iosfwd> |
8 | | #include <set> |
9 | | #include <string> |
10 | | #include <vector> |
11 | | |
12 | | #include "cmDiagnostics.h" |
13 | | #include "cmExportCMakeConfigGenerator.h" |
14 | | |
15 | | class cmGeneratorTarget; |
16 | | class cmGlobalGenerator; |
17 | | class cmMakefile; |
18 | | |
19 | | class cmExportTryCompileFileGenerator : public cmExportCMakeConfigGenerator |
20 | | { |
21 | | public: |
22 | | cmExportTryCompileFileGenerator(cmGlobalGenerator* gg, |
23 | | std::vector<std::string> const& targets, |
24 | | cmMakefile* mf, |
25 | | std::set<std::string> const& langs); |
26 | | |
27 | | /** Set the list of targets to export. */ |
28 | 0 | void SetConfig(std::string const& config) { this->Config = config; } |
29 | | |
30 | | protected: |
31 | | // Implement virtual methods from the superclass. |
32 | | void ComplainAboutDuplicateTarget( |
33 | 0 | std::string const& /*targetName*/) const override {}; |
34 | | void IssueMessage(MessageType type, |
35 | | std::string const& message) const override; |
36 | | void IssueDiagnostic(cmDiagnosticCategory category, |
37 | | std::string const& message) const override; |
38 | | |
39 | | bool GenerateMainFile(std::ostream& os) override; |
40 | | |
41 | | void GenerateImportTargetsConfig(std::ostream&, std::string const&, |
42 | | std::string const&) override |
43 | 0 | { |
44 | 0 | } |
45 | | void HandleMissingTarget(std::string&, cmGeneratorTarget const*, |
46 | | cmGeneratorTarget*) override |
47 | 0 | { |
48 | 0 | } |
49 | | |
50 | | ExportInfo FindExportInfo(cmGeneratorTarget const* /*target*/) const override |
51 | 0 | { |
52 | 0 | return { {}, {}, {} }; |
53 | 0 | } |
54 | | |
55 | | void PopulateProperties(cmGeneratorTarget const* target, |
56 | | ImportPropertyMap& properties, |
57 | | std::set<cmGeneratorTarget const*>& emitted); |
58 | | |
59 | | std::string InstallNameDir(cmGeneratorTarget const* target, |
60 | | std::string const& config) override; |
61 | | |
62 | | std::string GetFileSetDirectories(cmGeneratorTarget* target, |
63 | | cmGeneratorFileSet const* fileSet, |
64 | | cmTargetExport const* te) override; |
65 | | |
66 | | std::string GetFileSetFiles(cmGeneratorTarget* target, |
67 | | cmGeneratorFileSet const* fileSet, |
68 | | cmTargetExport const* te) override; |
69 | | |
70 | 0 | std::string GetCxxModulesDirectory() const override { return {}; } |
71 | | void GenerateCxxModuleConfigInformation(std::string const&, |
72 | | std::ostream&) const override |
73 | 0 | { |
74 | 0 | } |
75 | | |
76 | | private: |
77 | | std::string FindTargets(std::string const& prop, |
78 | | cmGeneratorTarget const* tgt, |
79 | | std::string const& language, |
80 | | std::set<cmGeneratorTarget const*>& emitted); |
81 | | |
82 | | std::vector<cmGeneratorTarget const*> Exports; |
83 | | std::string Config; |
84 | | std::vector<std::string> Languages; |
85 | | }; |