Imported Upstream version 2.8.12.2
[platform/upstream/cmake.git] / Source / cmNinjaNormalTargetGenerator.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2011 Peter Collingbourne <peter@pcc.me.uk>
4   Copyright 2011 Nicolas Despres <nicolas.despres@gmail.com>
5
6   Distributed under the OSI-approved BSD License (the "License");
7   see accompanying file Copyright.txt for details.
8
9   This software is distributed WITHOUT ANY WARRANTY; without even the
10   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11   See the License for more information.
12 ============================================================================*/
13 #ifndef cmNinjaNormalTargetGenerator_h
14 #  define cmNinjaNormalTargetGenerator_h
15
16 #  include "cmNinjaTargetGenerator.h"
17 #  include "cmNinjaTypes.h"
18 #  include "cmStandardIncludes.h"
19
20 #  include <set>
21
22 class cmSourceFile;
23 class cmOSXBundleGenerator;
24
25 class cmNinjaNormalTargetGenerator : public cmNinjaTargetGenerator
26 {
27 public:
28   cmNinjaNormalTargetGenerator(cmTarget* target);
29   ~cmNinjaNormalTargetGenerator();
30
31   void Generate();
32
33 private:
34   std::string LanguageLinkerRule() const;
35   const char* GetVisibleTypeName() const;
36   void WriteLanguagesRules();
37   void WriteLinkRule(bool useResponseFile);
38   void WriteLinkStatement();
39   void WriteObjectLibStatement();
40   std::vector<std::string> ComputeLinkCmd();
41
42 private:
43   // Target name info.
44   std::string TargetNameOut;
45   std::string TargetNameSO;
46   std::string TargetNameReal;
47   std::string TargetNameImport;
48   std::string TargetNamePDB;
49   const char *TargetLinkLanguage;
50 };
51
52 #endif // ! cmNinjaNormalTargetGenerator_h