cmNinjaNormalTargetGenerator.h 1.21 KB
Newer Older
1 2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
3
#ifndef cmNinjaNormalTargetGenerator_h
4
#define cmNinjaNormalTargetGenerator_h
5

6
#include "cmConfigure.h" // IWYU pragma: keep
7

8
#include "cmGeneratorTarget.h"
9
#include "cmNinjaTargetGenerator.h"
10

11 12
#include <string>
#include <vector>
13 14 15 16

class cmNinjaNormalTargetGenerator : public cmNinjaTargetGenerator
{
public:
17
  cmNinjaNormalTargetGenerator(cmGeneratorTarget* target);
18
  ~cmNinjaNormalTargetGenerator() override;
19

20
  void Generate() override;
21 22 23

private:
  std::string LanguageLinkerRule() const;
24 25
  std::string LanguageLinkerDeviceRule() const;

26 27
  const char* GetVisibleTypeName() const;
  void WriteLanguagesRules();
28

29
  void WriteLinkRule(bool useResponseFile);
30 31
  void WriteDeviceLinkRule(bool useResponseFile);

32
  void WriteLinkStatement();
33 34
  void WriteDeviceLinkStatement();

35
  void WriteObjectLibStatement();
36

37
  std::vector<std::string> ComputeLinkCmd();
38
  std::vector<std::string> ComputeDeviceLinkCmd();
39 40 41

private:
  // Target name info.
42
  cmGeneratorTarget::Names TargetNames;
43
  std::string TargetLinkLanguage;
44
  std::string DeviceLinkObject;
45 46 47
};

#endif // ! cmNinjaNormalTargetGenerator_h