cmake.h 18.8 KB
Newer Older
1
2
3
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Ken Martin's avatar
Ken Martin committed
4

5
6
  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.
Ken Martin's avatar
Ken Martin committed
7

8
9
10
11
  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/
Ken Martin's avatar
Ken Martin committed
12

13
14
15
#ifndef cmake_h
#define cmake_h

Ken Martin's avatar
Ken Martin committed
16
#include "cmSystemTools.h"
17
18
#include "cmPropertyDefinitionMap.h"
#include "cmPropertyMap.h"
Ken Martin's avatar
Ken Martin committed
19

20
class cmGlobalGeneratorFactory;
Ken Martin's avatar
Ken Martin committed
21
22
23
24
class cmGlobalGenerator;
class cmLocalGenerator;
class cmCacheManager;
class cmMakefile;
Ken Martin's avatar
Ken Martin committed
25
class cmCommand;
26
class cmVariableWatch;
27
class cmFileTimeComparison;
Alexander Neundorf's avatar
 
Alexander Neundorf committed
28
class cmExternalMakefileProjectGenerator;
29
class cmDocumentationSection;
30
class cmPolicies;
31
class cmListFileBacktrace;
32
class cmTarget;
33
class cmGeneratedFileStream;
Ken Martin's avatar
Ken Martin committed
34

Yury G. Kudryashov's avatar
Yury G. Kudryashov committed
35
36
37
/** \brief Represents a cmake invocation.
 *
 * This class represents a cmake invocation. It is the top level class when
38
 * running cmake. Most cmake based GUIs should primarily create an instance
Yury G. Kudryashov's avatar
Yury G. Kudryashov committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 * of this class and communicate with it.
 *
 * The basic process for a GUI is as follows:
 *
 * -# Create a cmake instance
 * -# Set the Home & Start directories, generator, and cmake command. this
 *    can be done using the Set methods or by using SetArgs and passing in
 *    command line arguments.
 * -# Load the cache by calling LoadCache (duh)
 * -# if you are using command line arguments with -D or -C flags then
 *    call SetCacheArgs (or if for some other reason you want to modify the
 *    cache), do it now.
 * -# Finally call Configure
 * -# Let the user change values and go back to step 5
 * -# call Generate

 * If your GUI allows the user to change the start & home directories then
 * you must at a minimum redo steps 2 through 7.
 */

Ken Martin's avatar
Ken Martin committed
59
class cmake
Ken Martin's avatar
Ken Martin committed
60
61
{
 public:
Bill Hoffman's avatar
Bill Hoffman committed
62
63
64
  enum MessageType
  { AUTHOR_WARNING,
    FATAL_ERROR,
65
    INTERNAL_ERROR,
Bill Hoffman's avatar
Bill Hoffman committed
66
67
    MESSAGE,
    WARNING,
68
69
70
    LOG,
    DEPRECATION_ERROR,
    DEPRECATION_WARNING
Bill Hoffman's avatar
Bill Hoffman committed
71
  };
72
73


74
  /** \brief Describes the working modes of cmake */
75
76
  enum WorkingMode
  {
77
78
79
80
81
82
83
    NORMAL_MODE, ///< Cmake runs to create project files
    /** \brief Script mode (started by using -P).
     *
     * In script mode there is no generator and no cache. Also,
     * languages are not enabled, so add_executable and things do
     * nothing.
     */
84
    SCRIPT_MODE,
85
86
87
88
89
90
91
    /** \brief A pkg-config like mode
     *
     * In this mode cmake just searches for a package and prints the results to
     * stdout. This is similar to SCRIPT_MODE, but commands like add_library()
     * work too, since they may be used e.g. in exported target files. Started
     * via --find-package.
     */
92
93
    FIND_PACKAGE_MODE
  };
94
95
  typedef std::map<cmStdString, cmCommand*> RegisteredCommandsMap;

96
  /// Default constructor
Ken Martin's avatar
Ken Martin committed
97
  cmake();
98
  /// Destructor
Ken Martin's avatar
Ken Martin committed
99
  ~cmake();
Ken Martin's avatar
Ken Martin committed
100

101
  static const char *GetCMakeFilesDirectory() {return "/CMakeFiles";};
Ken Martin's avatar
Ken Martin committed
102
103
  static const char *GetCMakeFilesDirectoryPostSlash() {
    return "CMakeFiles/";};
104

Ken Martin's avatar
Ken Martin committed
105
106
107
  //@{
  /**
   * Set/Get the home directory (or output directory) in the project. The
108
109
   * home directory is the top directory of the project. It is the
   * path-to-source cmake was run with. Remember that CMake processes
Ken Martin's avatar
Ken Martin committed
110
   * CMakeLists files by recursing up the tree starting at the StartDirectory
111
   * and going up until it reaches the HomeDirectory.
Ken Martin's avatar
Ken Martin committed
112
113
114
115
   */
  void SetHomeDirectory(const char* dir);
  const char* GetHomeDirectory() const
    {
Ken Martin's avatar
Ken Martin committed
116
    return this->cmHomeDirectory.c_str();
Ken Martin's avatar
Ken Martin committed
117
118
119
120
    }
  void SetHomeOutputDirectory(const char* lib);
  const char* GetHomeOutputDirectory() const
    {
Ken Martin's avatar
Ken Martin committed
121
    return this->HomeOutputDirectory.c_str();
Ken Martin's avatar
Ken Martin committed
122
123
124
125
126
127
128
129
130
    }
  //@}

  //@{
  /**
   * Set/Get the start directory (or output directory). The start directory
   * is the directory of the CMakeLists.txt file that started the current
   * round of processing. Remember that CMake processes CMakeLists files by
   * recursing up the tree starting at the StartDirectory and going up until
131
   * it reaches the HomeDirectory.
Ken Martin's avatar
Ken Martin committed
132
   */
133
  void SetStartDirectory(const char* dir)
Ken Martin's avatar
Ken Martin committed
134
    {
Ken Martin's avatar
Ken Martin committed
135
136
      this->cmStartDirectory = dir;
      cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
Ken Martin's avatar
Ken Martin committed
137
138
139
    }
  const char* GetStartDirectory() const
    {
Ken Martin's avatar
Ken Martin committed
140
      return this->cmStartDirectory.c_str();
Ken Martin's avatar
Ken Martin committed
141
142
143
    }
  void SetStartOutputDirectory(const char* lib)
    {
Ken Martin's avatar
Ken Martin committed
144
145
      this->StartOutputDirectory = lib;
      cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory);
Ken Martin's avatar
Ken Martin committed
146
147
148
    }
  const char* GetStartOutputDirectory() const
    {
Ken Martin's avatar
Ken Martin committed
149
      return this->StartOutputDirectory.c_str();
Ken Martin's avatar
Ken Martin committed
150
151
152
153
154
155
    }
  //@}

  /**
   * Handle a command line invocation of cmake.
   */
156
  int Run(const std::vector<std::string>&args)
Andy Cedilnik's avatar
Andy Cedilnik committed
157
    { return this->Run(args, false); }
158
  int Run(const std::vector<std::string>&args, bool noconfigure);
Ken Martin's avatar
Ken Martin committed
159
160

  /**
161
   * Run the global generator Generate step.
Ken Martin's avatar
Ken Martin committed
162
   */
Ken Martin's avatar
Ken Martin committed
163
164
165
166
167
168
169
170
  int Generate();

  /**
   * Configure the cmMakefiles. This routine will create a GlobalGenerator if
   * one has not already been set. It will then Call Configure on the
   * GlobalGenerator. This in turn will read in an process all the CMakeList
   * files for the tree. It will not produce any actual Makefiles, or
   * workspaces. Generate does that.  */
171
  int Configure();
172
  int ActualConfigure();
173

Andy Cedilnik's avatar
Andy Cedilnik committed
174
  int LoadCache();
175
  void PreLoadCMakeFiles();
Ken Martin's avatar
Ken Martin committed
176
177
178
179
180

  ///! Create a GlobalGenerator
  cmGlobalGenerator* CreateGlobalGenerator(const char* name);

  ///! Return the global generator assigned to this instance of cmake
Alexander Neundorf's avatar
 
Alexander Neundorf committed
181
182
  cmGlobalGenerator* GetGlobalGenerator()     { return this->GlobalGenerator; }
  ///! Return the global generator assigned to this instance of cmake, const
183
  const cmGlobalGenerator* GetGlobalGenerator() const
Alexander Neundorf's avatar
 
Alexander Neundorf committed
184
                                              { return this->GlobalGenerator; }
Ken Martin's avatar
Ken Martin committed
185
186
187
188
189
190
191

  ///! Return the global generator assigned to this instance of cmake
  void SetGlobalGenerator(cmGlobalGenerator *);

  ///! Get the names of the current registered generators
  void GetRegisteredGenerators(std::vector<std::string>& names);

192
193
194
195
196
197
198
199
  ///! Set the name of the selected generator-specific toolset.
  void SetGeneratorToolset(std::string const& ts)
    { this->GeneratorToolset = ts; }

  ///! Get the name of the selected generator-specific toolset.
  std::string const& GetGeneratorToolset() const
    { return this->GeneratorToolset; }

Ken Martin's avatar
Ken Martin committed
200
  ///! get the cmCachemManager used by this invocation of cmake
Ken Martin's avatar
Ken Martin committed
201
  cmCacheManager *GetCacheManager() { return this->CacheManager; }
202

203
  ///! set the cmake command this instance of cmake should use
Ken Martin's avatar
Ken Martin committed
204
  void SetCMakeCommand(const char* cmd) { this->CMakeCommand = cmd; }
205

Ken Martin's avatar
Ken Martin committed
206
207
208
209
  /**
   * Given a variable name, return its value (as a string).
   */
  const char* GetCacheDefinition(const char*) const;
210
  ///! Add an entry into the cache
211
212
  void AddCacheEntry(const char* key, const char* value,
                     const char* helpString,
213
                     int type);
Ken Martin's avatar
Ken Martin committed
214

215
  /**
216
217
218
219
   * Get the system information and write it to the file specified
   */
  int GetSystemInformation(std::vector<std::string>&);

Ken Martin's avatar
Ken Martin committed
220
221
222
223
  /**
   * Add a command to this cmake instance
   */
  void AddCommand(cmCommand* );
224
  void RenameCommand(const char* oldName, const char* newName);
Alexander Neundorf's avatar
 
Alexander Neundorf committed
225
  void RemoveCommand(const char* name);
Alexander Neundorf's avatar
 
Alexander Neundorf committed
226
  void RemoveUnscriptableCommands();
Ken Martin's avatar
Ken Martin committed
227
228
229
230
231
232

  /**
   * Get a command by its name
   */
  cmCommand *GetCommand(const char *name);

233
  /** Get list of all commands */
Ken Martin's avatar
Ken Martin committed
234
  RegisteredCommandsMap* GetCommands() { return &this->Commands; }
235

Ken Martin's avatar
Ken Martin committed
236
237
  /** Check if a command exists. */
  bool CommandExists(const char* name) const;
238

239
  ///! Parse command line arguments
Ben Boeckel's avatar
Ben Boeckel committed
240
241
  void SetArgs(const std::vector<std::string>&,
               bool directoriesSetBefore = false);
Ken Martin's avatar
Ken Martin committed
242

243
  ///! Is this cmake running as a result of a TRY_COMPILE command
Ken Martin's avatar
Ken Martin committed
244
  bool GetIsInTryCompile() { return this->InTryCompile; }
245

246
  ///! Is this cmake running as a result of a TRY_COMPILE command
Ken Martin's avatar
Ken Martin committed
247
  void SetIsInTryCompile(bool i) { this->InTryCompile = i; }
248

249
  ///! Parse command line arguments that might set cache values
250
  bool SetCacheArgs(const std::vector<std::string>&);
Ken Martin's avatar
Ken Martin committed
251

Ken Martin's avatar
Ken Martin committed
252
253
  typedef  void (*ProgressCallbackType)
    (const char*msg, float progress, void *);
Ken Martin's avatar
Ken Martin committed
254
  /**
255
   *  Set the function used by GUIs to receive progress updates
256
   *  Function gets passed: message as a const char*, a progress
Ken Martin's avatar
Ken Martin committed
257
   *  amount ranging from 0 to 1.0 and client data. The progress
258
   *  number provided may be negative in cases where a message is
Ken Martin's avatar
Ken Martin committed
259
260
   *  to be displayed without any progress percentage.
   */
Ken Martin's avatar
Ken Martin committed
261
  void SetProgressCallback(ProgressCallbackType f, void* clientData=0);
Ken Martin's avatar
Ken Martin committed
262
263
264
265

  ///! this is called by generators to update the progress
  void UpdateProgress(const char *msg, float prog);

266
267
  ///!  get the cmake policies instance
  cmPolicies *GetPolicies() {return this->Policies;} ;
268
269

  ///! Get the variable watch object
Ken Martin's avatar
Ken Martin committed
270
  cmVariableWatch* GetVariableWatch() { return this->VariableWatch; }
271

Alexander Neundorf's avatar
 
Alexander Neundorf committed
272
  /** Get the documentation entries for the supported commands.
273
   *  If withCurrentCommands is true, the documentation for the
Alexander Neundorf's avatar
 
Alexander Neundorf committed
274
275
276
277
278
   *  recommended set of commands is included.
   *  If withCompatCommands is true, the documentation for discouraged
   *  (compatibility) commands is included.
   *  You probably don't want to set both to false.
   */
279
280
  void GetCommandDocumentation(std::vector<cmDocumentationEntry>& entries,
                               bool withCurrentCommands = true,
Alexander Neundorf's avatar
 
Alexander Neundorf committed
281
                               bool withCompatCommands = true) const;
282
283
  void GetPropertiesDocumentation(std::map<std::string,
                                  cmDocumentationSection *>&);
284
  void GetGeneratorDocumentation(std::vector<cmDocumentationEntry>&);
285
  void GetPolicyDocumentation(std::vector<cmDocumentationEntry>& entries);
286

287
288
  ///! Set/Get a property of this target file
  void SetProperty(const char *prop, const char *value);
289
  void AppendProperty(const char *prop, const char *value,bool asString=false);
290
291
292
293
294
295
296
  const char *GetProperty(const char *prop);
  const char *GetProperty(const char *prop, cmProperty::ScopeType scope);
  bool GetPropertyAsBool(const char *prop);

  // Get the properties
  cmPropertyMap &GetProperties() { return this->Properties; };

297
298
  ///! Do all the checks before running configure
  int DoPreConfigureChecks();
299

300
301
  void SetWorkingMode(WorkingMode mode) { this->CurrentWorkingMode = mode; }
  WorkingMode GetWorkingMode() { return this->CurrentWorkingMode; }
302

303
  ///! Debug the try compile stuff by not deleting the files
Ken Martin's avatar
Ken Martin committed
304
305
  bool GetDebugTryCompile(){return this->DebugTryCompile;}
  void DebugTryCompileOn(){this->DebugTryCompile = true;}
306

Andy Cedilnik's avatar
Andy Cedilnik committed
307
308
309
  /**
   * Generate CMAKE_ROOT and CMAKE_COMMAND cache entries
   */
310
  int AddCMakePaths();
Andy Cedilnik's avatar
Andy Cedilnik committed
311

312
313
314
  /**
   * Get the file comparison class
   */
Ken Martin's avatar
Ken Martin committed
315
  cmFileTimeComparison* GetFileComparison() { return this->FileComparison; }
316

317
318
319
320
321
  /**
   * Get the path to ctest
   */
  const char* GetCTestCommand();
  const char* GetCPackCommand();
322
  const char* GetCMakeCommand();
323

324
325
  // Do we want debug output during the cmake run.
  bool GetDebugOutput() { return this->DebugOutput; }
326
  void SetDebugOutputOn(bool b) { this->DebugOutput = b;}
327

Bill Hoffman's avatar
Bill Hoffman committed
328
329
330
  // Do we want trace output during the cmake run.
  bool GetTrace() { return this->Trace;}
  void SetTrace(bool b) {  this->Trace = b;}
331
332
  bool GetWarnUninitialized() { return this->WarnUninitialized;}
  void SetWarnUninitialized(bool b) {  this->WarnUninitialized = b;}
333
334
  bool GetWarnUnused() { return this->WarnUnused;}
  void SetWarnUnused(bool b) {  this->WarnUnused = b;}
335
336
  bool GetWarnUnusedCli() { return this->WarnUnusedCli;}
  void SetWarnUnusedCli(bool b) {  this->WarnUnusedCli = b;}
337
338
  bool GetCheckSystemVars() { return this->CheckSystemVars;}
  void SetCheckSystemVars(bool b) {  this->CheckSystemVars = b;}
339
340
341

  void MarkCliAsUsed(const std::string& variable);

342
343
344
345
  // Define a property
  void DefineProperty(const char *name, cmProperty::ScopeType scope,
                      const char *ShortDescription,
                      const char *FullDescription,
346
                      bool chain = false,
347
                      const char *variableGroup = 0);
348

349
350
351
352
  // get property definition
  cmPropertyDefinition *GetPropertyDefinition
  (const char *name, cmProperty::ScopeType scope);

353
354
355
356
  // Is a property defined?
  bool IsPropertyDefined(const char *name, cmProperty::ScopeType scope);
  bool IsPropertyChained(const char *name, cmProperty::ScopeType scope);

357
358
359
360
  /** Get the list of configurations (in upper case) considered to be
      debugging configurations.*/
  std::vector<std::string> const& GetDebugConfigs();

Alexander Neundorf's avatar
 
Alexander Neundorf committed
361
362
363
  // Define the properties
  static void DefineProperties(cmake *cm);

364
365
366
367
  void SetCMakeEditCommand(const char* s)
    {
      this->CMakeEditCommand = s;
    }
368
369
  void SetSuppressDevWarnings(bool v)
    {
370
      this->SuppressDevWarnings = v;
371
      this->DoSuppressDevWarnings = true;
372
    }
373
374
375
376

  /** Display a message to the user.  */
  void IssueMessage(cmake::MessageType t, std::string const& text,
                    cmListFileBacktrace const& backtrace);
377
  ///! run the --build option
378
379
380
  int Build(const std::string& dir,
            const std::string& target,
            const std::string& config,
381
            const std::vector<std::string>& nativeOptions,
382
383
            bool clean,
            cmSystemTools::OutputOption outputflag);
384

385
  void UnwatchUnusedCli(const char* var);
386
  void WatchUnusedCli(const char* var);
387
protected:
388
  void RunCheckForUnusedVariables();
389
  void InitializeProperties();
390
  int HandleDeleteCacheVariables(const char* var);
391
  cmPropertyMap Properties;
392
  std::set<std::pair<cmStdString,cmProperty::ScopeType> > AccessedProperties;
393

394
  std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>
395
  PropertyDefinitions;
Alexander Neundorf's avatar
 
Alexander Neundorf committed
396

397
  typedef
Alexander Neundorf's avatar
 
Alexander Neundorf committed
398
399
400
     cmExternalMakefileProjectGenerator* (*CreateExtraGeneratorFunctionType)();
  typedef std::map<cmStdString,
                CreateExtraGeneratorFunctionType> RegisteredExtraGeneratorsMap;
401
  typedef std::vector<cmGlobalGeneratorFactory*> RegisteredGeneratorsVector;
Ken Martin's avatar
Ken Martin committed
402
  RegisteredCommandsMap Commands;
403
  RegisteredGeneratorsVector Generators;
Alexander Neundorf's avatar
 
Alexander Neundorf committed
404
  RegisteredExtraGeneratorsMap ExtraGenerators;
Ken Martin's avatar
Ken Martin committed
405
  void AddDefaultCommands();
406
  void AddDefaultGenerators();
Alexander Neundorf's avatar
 
Alexander Neundorf committed
407
  void AddDefaultExtraGenerators();
408
  void AddExtraGenerator(const char* name,
Alexander Neundorf's avatar
 
Alexander Neundorf committed
409
                         CreateExtraGeneratorFunctionType newFunction);
Ken Martin's avatar
Ken Martin committed
410

411
  cmPolicies *Policies;
Ken Martin's avatar
Ken Martin committed
412
413
  cmGlobalGenerator *GlobalGenerator;
  cmCacheManager *CacheManager;
414
  std::string cmHomeDirectory;
Ken Martin's avatar
Ken Martin committed
415
  std::string HomeOutputDirectory;
416
  std::string cmStartDirectory;
Ken Martin's avatar
Ken Martin committed
417
  std::string StartOutputDirectory;
418
  bool SuppressDevWarnings;
419
  bool DoSuppressDevWarnings;
420
  std::string GeneratorToolset;
421

Ken Martin's avatar
Ken Martin committed
422
  ///! read in a cmake list file to initialize the cache
423
  void ReadListFile(const std::vector<std::string>& args, const char *path);
424
  bool FindPackage(const std::vector<std::string>& args);
425
426
427
428

  ///! Check if CMAKE_CACHEFILE_DIR is set. If it is not, delete the log file.
  ///  If it is set, truncate it to 50kb
  void TruncateOutputLog(const char* fname);
429

430
431
432
433
434
  /**
   * Method called to check build system integrity at build time.
   * Returns 1 if CMake should rerun and 0 otherwise.
   */
  int CheckBuildSystem();
435

436
  void SetDirectoriesFromFile(const char* arg);
437

Ken Martin's avatar
Ken Martin committed
438
  //! Make sure all commands are what they say they are and there is no
439
  /// macros.
440
  void CleanupCommandsAndMacros();
441

Alexander Neundorf's avatar
 
Alexander Neundorf committed
442
  void GenerateGraphViz(const char* fileName) const;
443

Ken Martin's avatar
Ken Martin committed
444
  cmVariableWatch* VariableWatch;
445

Alexander Neundorf's avatar
 
Alexander Neundorf committed
446
447
  ///! Find the full path to one of the cmake programs like ctest, cpack, etc.
  std::string FindCMakeProgram(const char* name) const;
448
private:
449
450
  cmake(const cmake&);  // Not implemented.
  void operator=(const cmake&);  // Not implemented.
Ken Martin's avatar
Ken Martin committed
451
452
453
454
  ProgressCallbackType ProgressCallback;
  void* ProgressCallbackClientData;
  bool Verbose;
  bool InTryCompile;
455
  WorkingMode CurrentWorkingMode;
456
  bool DebugOutput;
Bill Hoffman's avatar
Bill Hoffman committed
457
  bool Trace;
458
  bool WarnUninitialized;
459
  bool WarnUnused;
460
  bool WarnUnusedCli;
461
  bool CheckSystemVars;
462
  std::map<cmStdString, bool> UsedCliVariables;
463
  std::string CMakeEditCommand;
Ken Martin's avatar
Ken Martin committed
464
465
466
467
  std::string CMakeCommand;
  std::string CXXEnvironment;
  std::string CCEnvironment;
  std::string CheckBuildSystemArgument;
468
  std::string CheckStampFile;
469
  std::string CheckStampList;
470
  std::string VSSolutionFile;
Ken Martin's avatar
Ken Martin committed
471
472
473
474
475
476
  std::string CTestCommand;
  std::string CPackCommand;
  bool ClearBuildSystem;
  bool DebugTryCompile;
  cmFileTimeComparison* FileComparison;
  std::string GraphVizFile;
477
  std::vector<std::string> DebugConfigs;
478

479
  void UpdateConversionPathTable();
Ken Martin's avatar
Ken Martin committed
480
481
};

482
#define CMAKE_STANDARD_OPTIONS_TABLE \
483
  {"-C <initial-cache>", "Pre-load a script to populate the cache.", \
484
485
486
487
488
   "When cmake is first run in an empty build tree, it creates a " \
   "CMakeCache.txt file and populates it with customizable settings " \
   "for the project.  This option may be used to specify a file from " \
   "which to load cache entries before the first pass through " \
   "the project's cmake listfiles.  The loaded entries take priority " \
489
490
491
   "over the project's default values.  The given file should be a CMake " \
   "script containing SET commands that use the CACHE option, " \
   "not a cache-format file."}, \
492
  {"-D <var>:<type>=<value>", "Create a cmake cache entry.", \
493
494
495
496
497
   "When cmake is first run in an empty build tree, it creates a " \
   "CMakeCache.txt file and populates it with customizable settings " \
   "for the project.  This option may be used to specify a setting " \
   "that takes priority over the project's default value.  The option " \
   "may be repeated for as many cache entries as desired."}, \
Alexander Neundorf's avatar
 
Alexander Neundorf committed
498
  {"-U <globbing_expr>", "Remove matching entries from CMake cache.", \
Alexander Neundorf's avatar
 
Alexander Neundorf committed
499
   "This option may be used to remove one or more variables from the " \
Alexander Neundorf's avatar
 
Alexander Neundorf committed
500
501
502
   "CMakeCache.txt file, globbing expressions using * and ? are supported. "\
   "The option may be repeated for as many cache entries as desired.\n" \
   "Use with care, you can make your CMakeCache.txt non-working."}, \
503
  {"-G <generator-name>", "Specify a build system generator.", \
504
   "CMake may support multiple native build systems on certain platforms.  " \
505
   "A generator is responsible for generating a particular build " \
506
   "system.  Possible generator names are specified in the Generators " \
Bill Hoffman's avatar
Bill Hoffman committed
507
   "section."},\
508
509
510
  {"-T <toolset-name>", "Specify toolset name if supported by generator.", \
   "Some CMake generators support a toolset name to be given to the " \
   "native build system to choose a compiler.  " \
511
512
   "This is supported only on specific generators:\n" \
   "  Visual Studio >= 10\n" \
513
   "  Xcode >= 3.0\n" \
514
   "See native build system documentation for allowed toolset names."}, \
Bill Hoffman's avatar
Bill Hoffman committed
515
516
517
518
519
520
521
  {"-Wno-dev", "Suppress developer warnings.",\
   "Suppress warnings that are meant for the author"\
   " of the CMakeLists.txt files."},\
  {"-Wdev", "Enable developer warnings.",\
   "Enable warnings that are meant for the author"\
   " of the CMakeLists.txt files."}

522
523

#define CMAKE_STANDARD_INTRODUCTION \
524
  {0, \
525
526
   "CMake is a cross-platform build system generator.  Projects " \
   "specify their build process with platform-independent CMake listfiles " \
Ken Martin's avatar
Ken Martin committed
527
528
   "included in each directory of a source tree with the name " \
   "CMakeLists.txt. " \
529
   "Users build a project by using CMake to generate a build system " \
530
   "for a native tool on their platform.", 0}
531
#endif