/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 "cmExportCMakeConfigGenerator.h" |
13 | | |
14 | | class cmGeneratorTarget; |
15 | | class cmGlobalGenerator; |
16 | | class cmMakefile; |
17 | | |
18 | | class cmExportTryCompileFileGenerator : public cmExportCMakeConfigGenerator |
19 | | { |
20 | | public: |
21 | | cmExportTryCompileFileGenerator(cmGlobalGenerator* gg, |
22 | | std::vector<std::string> const& targets, |
23 | | cmMakefile* mf, |
24 | | std::set<std::string> const& langs); |
25 | | |
26 | | /** Set the list of targets to export. */ |
27 | 0 | void SetConfig(std::string const& config) { this->Config = config; } |
28 | | |
29 | | protected: |
30 | | // Implement virtual methods from the superclass. |
31 | | void ComplainAboutDuplicateTarget( |
32 | 0 | std::string const& /*targetName*/) const override {}; |
33 | | void IssueMessage(MessageType type, |
34 | | std::string const& message) const override; |
35 | | |
36 | | bool GenerateMainFile(std::ostream& os) override; |
37 | | |
38 | | void GenerateImportTargetsConfig(std::ostream&, std::string const&, |
39 | | std::string const&) override |
40 | 0 | { |
41 | 0 | } |
42 | | void HandleMissingTarget(std::string&, cmGeneratorTarget const*, |
43 | | cmGeneratorTarget*) override |
44 | 0 | { |
45 | 0 | } |
46 | | |
47 | | ExportInfo FindExportInfo(cmGeneratorTarget const* /*target*/) const override |
48 | 0 | { |
49 | 0 | return { {}, {}, {} }; |
50 | 0 | } |
51 | | |
52 | | void PopulateProperties(cmGeneratorTarget const* target, |
53 | | ImportPropertyMap& properties, |
54 | | std::set<cmGeneratorTarget const*>& emitted); |
55 | | |
56 | | std::string InstallNameDir(cmGeneratorTarget const* target, |
57 | | std::string const& config) override; |
58 | | |
59 | | std::string GetFileSetDirectories(cmGeneratorTarget* target, |
60 | | cmFileSet* fileSet, |
61 | | cmTargetExport const* te) override; |
62 | | |
63 | | std::string GetFileSetFiles(cmGeneratorTarget* target, cmFileSet* fileSet, |
64 | | cmTargetExport const* te) override; |
65 | | |
66 | 0 | std::string GetCxxModulesDirectory() const override { return {}; } |
67 | | void GenerateCxxModuleConfigInformation(std::string const&, |
68 | | std::ostream&) const override |
69 | 0 | { |
70 | 0 | } |
71 | | |
72 | | private: |
73 | | std::string FindTargets(std::string const& prop, |
74 | | cmGeneratorTarget const* tgt, |
75 | | std::string const& language, |
76 | | std::set<cmGeneratorTarget const*>& emitted); |
77 | | |
78 | | std::vector<cmGeneratorTarget const*> Exports; |
79 | | std::string Config; |
80 | | std::vector<std::string> Languages; |
81 | | }; |