98
101
std::string *output,
99
102
const char *makeProgram, const char *config,
101
virtual std::string GenerateBuildCommand(const char* makeProgram,
102
const char *projectName, const char *targetName,
103
const char* config, bool ignoreErrors);
104
virtual std::string GenerateBuildCommand
105
(const char* makeProgram,
106
const char *projectName, const char* additionalOptions,
107
const char *targetName,
108
const char* config, bool ignoreErrors);
105
111
///! Set the CMake instance
106
void SetCMakeInstance(cmake *cm) {
107
this->m_CMakeInstance = cm; };
112
void SetCMakeInstance(cmake *cm) { this->CMakeInstance = cm; };
109
114
///! Get the CMake instance
110
cmake *GetCMakeInstance() {
111
return this->m_CMakeInstance; };
113
void SetConfiguredFilesPath(const char* s){m_ConfiguredFilesPath = s;}
114
void GetLocalGenerators(std::vector<cmLocalGenerator *>&g) { g = m_LocalGenerators;}
115
cmake *GetCMakeInstance() { return this->CMakeInstance; };
117
void SetConfiguredFilesPath(const char* s){this->ConfiguredFilesPath = s;}
118
cmLocalGenerator* GetLocalGenerator(int p) {
119
return this->LocalGenerators[p];}
120
void GetLocalGenerators(std::vector<cmLocalGenerator *>&g) {
121
g = this->LocalGenerators;}
115
123
void AddLocalGenerator(cmLocalGenerator *lg);
125
void AddInstallComponent(const char* component);
117
127
static int s_TryCompileTimeout;
119
bool GetForceUnixPaths() {return m_ForceUnixPaths;}
129
bool GetForceUnixPaths() {return this->ForceUnixPaths;}
130
bool GetToolSupportsColor() { return this->ToolSupportsColor; }
120
131
///! return the language for the given extension
121
132
const char* GetLanguageFromExtension(const char* ext);
122
133
///! is an extension to be ignored
149
163
///! Find a local generator by its startdirectory
150
164
cmLocalGenerator* FindLocalGenerator(const char* start_dir);
166
/** Append the subdirectory for the given configuration. If anything is
167
appended the given prefix and suffix will be appended around it, which
168
is useful for leading or trailing slashes. */
169
virtual void AppendDirectoryForConfig(const char* prefix,
174
/** Get the manifest of all targets that will be built for each
175
configuration. This is valid during generation only. */
176
cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; }
178
void AddTarget(cmTargets::value_type &v) {
179
this->TotalTargets[v.first] = &v.second;};
181
/** Support for multiple custom command outputs. */
182
virtual void CheckMultipleOutputs(cmMakefile* mf, bool verbose);
184
virtual const char* GetAllTargetName() { return "ALL_BUILD"; }
185
virtual const char* GetInstallTargetName() { return "INSTALL"; }
186
virtual const char* GetPreinstallTargetName() { return 0; }
187
virtual const char* GetTestTargetName() { return "RUN_TESTS"; }
188
virtual const char* GetPackageTargetName() { return "PACKAGE"; }
189
virtual const char* GetPackageSourceTargetName(){ return 0; }
190
virtual const char* GetEditCacheTargetName() { return 0; }
191
virtual const char* GetRebuildCacheTargetName() { return 0; }
153
// Fill the m_ProjectMap, this must be called after m_LocalGenerators has been populated.
194
// Fill the ProjectMap, this must be called after LocalGenerators
195
// has been populated.
154
196
void FillProjectMap();
155
197
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen);
157
199
void ConfigureRelativePaths();
158
200
void SetupTests();
160
bool m_ForceUnixPaths;
161
cmStdString m_FindMakeProgramFile;
162
cmStdString m_ConfiguredFilesPath;
163
cmake *m_CMakeInstance;
164
std::vector<cmLocalGenerator *> m_LocalGenerators;
202
void CreateDefaultGlobalTargets(cmTargets* targets);
203
cmTarget CreateGlobalTarget(const char* name, const char* message,
204
const cmCustomCommandLines* commandLines,
205
std::vector<std::string> depends, bool depends_on_all = false);
208
bool ToolSupportsColor;
209
cmStdString FindMakeProgramFile;
210
cmStdString ConfiguredFilesPath;
211
cmake *CMakeInstance;
212
std::vector<cmLocalGenerator *> LocalGenerators;
165
213
// map from project name to vector of local generators in that project
166
std::map<cmStdString, std::vector<cmLocalGenerator*> > m_ProjectMap;
214
std::map<cmStdString, std::vector<cmLocalGenerator*> > ProjectMap;
216
// Set of named installation components requested by the project.
217
std::set<cmStdString> InstallComponents;
219
// Manifest of all targets that will be built for each configuration.
220
// This is computed just before local generators generate.
221
cmTargetManifest TargetManifest;
169
224
// If you add a new map here, make sure it is copied
170
225
// in EnableLanguagesFromGenerator
171
std::map<cmStdString, bool> m_IgnoreExtensions;
172
std::map<cmStdString, bool> m_LanguageEnabled;
173
std::map<cmStdString, cmStdString> m_OutputExtensions;
174
std::map<cmStdString, cmStdString> m_LanguageToOutputExtension;
175
std::map<cmStdString, cmStdString> m_ExtensionToLanguage;
176
std::map<cmStdString, cmStdString> m_LanguageToLinkerPreference;
226
std::map<cmStdString, bool> IgnoreExtensions;
227
std::map<cmStdString, bool> LanguageEnabled;
228
std::map<cmStdString, cmStdString> OutputExtensions;
229
std::map<cmStdString, cmStdString> LanguageToOutputExtension;
230
std::map<cmStdString, cmStdString> ExtensionToLanguage;
231
std::map<cmStdString, cmStdString> LanguageToLinkerPreference;
178
233
// The paths to the tops of the source and binary trees used for
179
234
// relative path computation. A path must be either in the source
180
235
// tree or the build tree to be converted to a relative path. The
181
236
// ConfigureRelativePaths method may set these to be empty when
182
237
// using relative paths is unsafe.
183
std::string m_RelativePathTopSource;
184
std::string m_RelativePathTopBinary;
238
std::string RelativePathTopSource;
239
std::string RelativePathTopBinary;
241
// this is used to improve performance
242
std::map<cmStdString,cmTarget *> TotalTargets;