/src/CMake/Source/cmExportBuildCMakeConfigGenerator.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 <string> |
9 | | |
10 | | #include "cmExportBuildFileGenerator.h" |
11 | | #include "cmExportCMakeConfigGenerator.h" |
12 | | |
13 | | /** \class cmExportBuildCMakeConfigGenerator |
14 | | * \brief Generate a file exporting targets from a build tree. |
15 | | * |
16 | | * cmExportBuildCMakeConfigGenerator generates a file exporting targets from |
17 | | * a build tree. This exports the targets to CMake's native package |
18 | | * configuration format. A single file exports information for all |
19 | | * configurations built. |
20 | | * |
21 | | * This is used to implement the export() command. |
22 | | */ |
23 | | class cmExportBuildCMakeConfigGenerator |
24 | | : public cmExportCMakeConfigGenerator |
25 | | , public cmExportBuildFileGenerator |
26 | | { |
27 | | public: |
28 | | cmExportBuildCMakeConfigGenerator(); |
29 | | |
30 | | /** Set whether to append generated code to the output file. */ |
31 | 0 | void SetAppendMode(bool append) { this->AppendMode = append; } |
32 | | |
33 | | protected: |
34 | | // Implement virtual methods from the superclass. |
35 | | bool GenerateMainFile(std::ostream& os) override; |
36 | | void GenerateImportTargetsConfig(std::ostream& os, std::string const& config, |
37 | | std::string const& suffix) override; |
38 | | |
39 | | std::string GetFileSetDirectories(cmGeneratorTarget* gte, cmFileSet* fileSet, |
40 | | cmTargetExport const* te) override; |
41 | | std::string GetFileSetFiles(cmGeneratorTarget* gte, cmFileSet* fileSet, |
42 | | cmTargetExport const* te) override; |
43 | | |
44 | | void GenerateCxxModuleConfigInformation(std::string const&, |
45 | | std::ostream&) const override; |
46 | | bool GenerateImportCxxModuleConfigTargetInclusion(std::string const&, |
47 | | std::string) const; |
48 | | }; |