/src/CMake/Source/cmLocalCommonGenerator.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 <string> |
8 | | #include <vector> |
9 | | |
10 | | #include "cmLocalGenerator.h" |
11 | | |
12 | | class cmGeneratorTarget; |
13 | | class cmGlobalGenerator; |
14 | | class cmMakefile; |
15 | | |
16 | | /** \class cmLocalCommonGenerator |
17 | | * \brief Common infrastructure for Makefile and Ninja local generators. |
18 | | */ |
19 | | class cmLocalCommonGenerator : public cmLocalGenerator |
20 | | { |
21 | | public: |
22 | | cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf); |
23 | | ~cmLocalCommonGenerator() override; |
24 | | |
25 | | std::vector<std::string> const& GetConfigNames() const |
26 | 0 | { |
27 | 0 | return this->ConfigNames; |
28 | 0 | } |
29 | | |
30 | | virtual std::string const& GetWorkingDirectory() const; |
31 | | |
32 | | std::string GetTargetFortranFlags(cmGeneratorTarget const* target, |
33 | | std::string const& config) override; |
34 | | |
35 | | std::string ComputeLongTargetDirectory(cmGeneratorTarget const* gt) const; |
36 | | std::string GetTargetDirectory( |
37 | | cmGeneratorTarget const* target, |
38 | | cmStateEnums::IntermediateDirKind kind) const override; |
39 | | |
40 | | void ComputeObjectFilenames( |
41 | | std::map<cmSourceFile const*, cmObjectLocations>& mapping, |
42 | | std::string const& config, cmGeneratorTarget const* gt = nullptr) override; |
43 | | |
44 | | protected: |
45 | | std::vector<std::string> ConfigNames; |
46 | | |
47 | | friend class cmCommonTargetGenerator; |
48 | | }; |