| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 | 
							- /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 
-    file Copyright.txt or https://cmake.org/licensing for details.  */
 
- #ifndef cmLocalNinjaGenerator_h
 
- #define cmLocalNinjaGenerator_h
 
- #include <cmConfigure.h>
 
- #include "cmLocalCommonGenerator.h"
 
- #include "cmLocalGenerator.h"
 
- #include "cmNinjaTypes.h"
 
- #include "cmOutputConverter.h"
 
- #include <iosfwd>
 
- #include <map>
 
- #include <set>
 
- #include <string>
 
- #include <vector>
 
- class cmCustomCommand;
 
- class cmCustomCommandGenerator;
 
- class cmGeneratedFileStream;
 
- class cmGeneratorTarget;
 
- class cmGlobalGenerator;
 
- class cmGlobalNinjaGenerator;
 
- class cmMakefile;
 
- class cmSourceFile;
 
- class cmake;
 
- /**
 
-  * \class cmLocalNinjaGenerator
 
-  * \brief Write a local build.ninja file.
 
-  *
 
-  * cmLocalNinjaGenerator produces a local build.ninja file from its
 
-  * member Makefile.
 
-  */
 
- class cmLocalNinjaGenerator : public cmLocalCommonGenerator
 
- {
 
- public:
 
-   cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
 
-   ~cmLocalNinjaGenerator() CM_OVERRIDE;
 
-   void Generate() CM_OVERRIDE;
 
-   std::string GetTargetDirectory(cmGeneratorTarget const* target) const
 
-     CM_OVERRIDE;
 
-   const cmGlobalNinjaGenerator* GetGlobalNinjaGenerator() const;
 
-   cmGlobalNinjaGenerator* GetGlobalNinjaGenerator();
 
-   const cmake* GetCMakeInstance() const;
 
-   cmake* GetCMakeInstance();
 
-   /// @returns the relative path between the HomeOutputDirectory and this
 
-   /// local generators StartOutputDirectory.
 
-   std::string GetHomeRelativeOutputPath() const
 
-   {
 
-     return this->HomeRelativeOutputPath;
 
-   }
 
-   void ExpandRuleVariables(std::string& string,
 
-                            const RuleVariables& replaceValues)
 
-   {
 
-     cmLocalGenerator::ExpandRuleVariables(string, replaceValues);
 
-   }
 
-   std::string BuildCommandLine(const std::vector<std::string>& cmdLines);
 
-   void AppendTargetOutputs(cmGeneratorTarget* target, cmNinjaDeps& outputs);
 
-   void AppendTargetDepends(cmGeneratorTarget* target, cmNinjaDeps& outputs);
 
-   void AddCustomCommandTarget(cmCustomCommand const* cc,
 
-                               cmGeneratorTarget* target);
 
-   void AppendCustomCommandLines(cmCustomCommandGenerator const& ccg,
 
-                                 std::vector<std::string>& cmdLines);
 
-   void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg,
 
-                                cmNinjaDeps& ninjaDeps);
 
-   std::string ConvertToLinkReference(std::string const& lib,
 
-                                      cmOutputConverter::OutputFormat format =
 
-                                        cmOutputConverter::SHELL) CM_OVERRIDE;
 
-   void ComputeObjectFilenames(
 
-     std::map<cmSourceFile const*, std::string>& mapping,
 
-     cmGeneratorTarget const* gt = CM_NULLPTR) CM_OVERRIDE;
 
- protected:
 
-   std::string ConvertToIncludeReference(
 
-     std::string const& path,
 
-     cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL,
 
-     bool forceFullPaths = false) CM_OVERRIDE;
 
- private:
 
-   cmGeneratedFileStream& GetBuildFileStream() const;
 
-   cmGeneratedFileStream& GetRulesFileStream() const;
 
-   void WriteBuildFileTop();
 
-   void WriteProjectHeader(std::ostream& os);
 
-   void WriteNinjaRequiredVersion(std::ostream& os);
 
-   void WriteNinjaFilesInclusion(std::ostream& os);
 
-   void WriteProcessedMakefile(std::ostream& os);
 
-   void WritePools(std::ostream& os);
 
-   void WriteCustomCommandRule();
 
-   void WriteCustomCommandBuildStatement(cmCustomCommand const* cc,
 
-                                         const cmNinjaDeps& orderOnlyDeps);
 
-   void WriteCustomCommandBuildStatements();
 
-   std::string MakeCustomLauncher(cmCustomCommandGenerator const& ccg);
 
-   std::string HomeRelativeOutputPath;
 
-   typedef std::map<cmCustomCommand const*, std::set<cmGeneratorTarget*> >
 
-     CustomCommandTargetMap;
 
-   CustomCommandTargetMap CustomCommandTargets;
 
-   std::vector<cmCustomCommand const*> CustomCommands;
 
- };
 
- #endif // ! cmLocalNinjaGenerator_h
 
 
  |