resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmGlobalJOMMakefileGenerator.h
1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #pragma once
4
5 #include <iosfwd>
6 #include <memory>
7 #include <string>
8 #include <vector>
9
10 #include "cmGlobalGeneratorFactory.h"
11 #include "cmGlobalUnixMakefileGenerator3.h"
12 #include "cmValue.h"
13
14 class cmMakefile;
15 class cmake;
16 struct cmDocumentationEntry;
17
18 /** \class cmGlobalJOMMakefileGenerator
19  * \brief Write a JOM makefiles.
20  *
21  * cmGlobalJOMMakefileGenerator manages nmake build process for a tree
22  */
23 class cmGlobalJOMMakefileGenerator : public cmGlobalUnixMakefileGenerator3
24 {
25 public:
26   cmGlobalJOMMakefileGenerator(cmake* cm);
27   static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory()
28   {
29     return std::unique_ptr<cmGlobalGeneratorFactory>(
30       new cmGlobalGeneratorSimpleFactory<cmGlobalJOMMakefileGenerator>());
31   }
32   //! Get the name for the generator.
33   std::string GetName() const override
34   {
35     return cmGlobalJOMMakefileGenerator::GetActualName();
36   }
37   // use NMake Makefiles in the name so that scripts/tests that depend on the
38   // name NMake Makefiles will work
39   static std::string GetActualName() { return "NMake Makefiles JOM"; }
40
41   /** Get the documentation entry for this generator.  */
42   static void GetDocumentation(cmDocumentationEntry& entry);
43
44   /**
45    * Try to determine system information such as shared library
46    * extension, pthreads, byte order etc.
47    */
48   void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
49                       bool optional) override;
50
51 protected:
52   std::vector<GeneratedMakeCommand> GenerateBuildCommand(
53     const std::string& makeProgram, const std::string& projectName,
54     const std::string& projectDir, std::vector<std::string> const& targetNames,
55     const std::string& config, int jobs, bool verbose,
56     const cmBuildOptions& buildOptions = cmBuildOptions(),
57     std::vector<std::string> const& makeOptions =
58       std::vector<std::string>()) override;
59
60 private:
61   void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
62                            cmValue envVar) const override;
63 };