Introduce "generator expressions" to add_test()
[cmake.git] / Source / cmLocalVisualStudio6Generator.h
blob2c8cb93b324d57ac86e64d49c82a1eea50c22139
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmLocalVisualStudio6Generator.h,v $
5 Language: C++
6 Date: $Date: 2009-06-16 15:57:18 $
7 Version: $Revision: 1.24 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmLocalVisualStudio6Generator_h
18 #define cmLocalVisualStudio6Generator_h
20 #include "cmLocalVisualStudioGenerator.h"
22 class cmTarget;
23 class cmSourceFile;
24 class cmSourceGroup;
25 class cmCustomCommand;
27 /** \class cmLocalVisualStudio6Generator
28 * \brief Write a LocalUnix makefiles.
30 * cmLocalVisualStudio6Generator produces a LocalUnix makefile from its
31 * member this->Makefile.
33 class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator
35 public:
36 ///! Set cache only and recurse to false by default.
37 cmLocalVisualStudio6Generator();
39 virtual ~cmLocalVisualStudio6Generator();
41 virtual void AddHelperCommands();
43 /**
44 * Generate the makefile for this directory.
46 virtual void Generate();
48 void OutputDSPFile();
50 enum BuildType {STATIC_LIBRARY, DLL, EXECUTABLE, WIN32_EXECUTABLE, UTILITY};
52 /**
53 * Specify the type of the build: static, dll, or executable.
55 void SetBuildType(BuildType, const char* libName, cmTarget&);
57 /**
58 * Return array of created DSP names in a STL vector.
59 * Each executable must have its own dsp.
61 std::vector<std::string> GetCreatedProjectNames()
63 return this->CreatedProjectNames;
65 virtual std::string GetTargetDirectory(cmTarget const& target) const;
66 void GetTargetObjectFileDirectories(cmTarget* target,
67 std::vector<std::string>&
68 dirs);
69 private:
70 std::string DSPHeaderTemplate;
71 std::string DSPFooterTemplate;
72 std::vector<std::string> CreatedProjectNames;
74 void CreateSingleDSP(const char *lname, cmTarget &tgt);
75 void WriteDSPFile(std::ostream& fout, const char *libName,
76 cmTarget &tgt);
77 void WriteDSPBeginGroup(std::ostream& fout,
78 const char* group,
79 const char* filter);
80 void WriteDSPEndGroup(std::ostream& fout);
82 void WriteDSPHeader(std::ostream& fout, const char *libName,
83 cmTarget &tgt, std::vector<cmSourceGroup> &sgs);
85 void WriteDSPFooter(std::ostream& fout);
86 void AddDSPBuildRule(cmTarget& tgt);
87 void WriteCustomRule(std::ostream& fout,
88 const char* source,
89 const cmCustomCommand& command,
90 const char* flags);
91 void AddUtilityCommandHack(cmTarget& target, int count,
92 std::vector<std::string>& depends,
93 const cmCustomCommand& origCommand);
94 void WriteGroup(const cmSourceGroup *sg, cmTarget& target,
95 std::ostream &fout, const char *libName);
96 class EventWriter;
97 friend class EventWriter;
98 std::string CreateTargetRules(cmTarget &target,
99 const char* configName,
100 const char *libName);
101 void ComputeLinkOptions(cmTarget& target, const char* configName,
102 const std::string extraOptions,
103 std::string& options);
104 std::string IncludeOptions;
105 std::vector<std::string> Configurations;
107 std::string GetConfigName(std::string const& configuration) const;
109 // Special definition check for VS6.
110 virtual bool CheckDefinition(std::string const& define) const;
113 #endif