OPTIONS_BUILD.txt 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ``-C <initial-cache>``
  2. Pre-load a script to populate the cache.
  3. When cmake is first run in an empty build tree, it creates a
  4. CMakeCache.txt file and populates it with customizable settings for
  5. the project. This option may be used to specify a file from which
  6. to load cache entries before the first pass through the project's
  7. cmake listfiles. The loaded entries take priority over the
  8. project's default values. The given file should be a CMake script
  9. containing SET commands that use the CACHE option, not a
  10. cache-format file.
  11. ``-D <var>:<type>=<value>, -D <var>=<value>``
  12. Create a cmake cache entry.
  13. When cmake is first run in an empty build tree, it creates a
  14. CMakeCache.txt file and populates it with customizable settings for
  15. the project. This option may be used to specify a setting that
  16. takes priority over the project's default value. The option may be
  17. repeated for as many cache entries as desired.
  18. If the ``:<type>`` portion is given it must be one of the types
  19. specified by the :command:`set` command documentation for its
  20. ``CACHE`` signature.
  21. If the ``:<type>`` portion is omitted the entry will be created
  22. with no type if it does not exist with a type already. If a
  23. command in the project sets the type to ``PATH`` or ``FILEPATH``
  24. then the ``<value>`` will be converted to an absolute path.
  25. This option may also be given as a single argument:
  26. ``-D<var>:<type>=<value>`` or ``-D<var>=<value>``.
  27. ``-U <globbing_expr>``
  28. Remove matching entries from CMake cache.
  29. This option may be used to remove one or more variables from the
  30. CMakeCache.txt file, globbing expressions using * and ? are
  31. supported. The option may be repeated for as many cache entries as
  32. desired.
  33. Use with care, you can make your CMakeCache.txt non-working.
  34. ``-G <generator-name>``
  35. Specify a build system generator.
  36. CMake may support multiple native build systems on certain
  37. platforms. A generator is responsible for generating a particular
  38. build system. Possible generator names are specified in the
  39. :manual:`cmake-generators(7)` manual.
  40. ``-T <toolset-name>``
  41. Specify toolset name if supported by generator.
  42. Some CMake generators support a toolset name to be given to the
  43. native build system to choose a compiler. This is supported only on
  44. specific generators:
  45. ::
  46. Visual Studio >= 10
  47. Xcode >= 3.0
  48. See native build system documentation for allowed toolset names.
  49. ``-A <platform-name>``
  50. Specify platform name if supported by generator.
  51. Some CMake generators support a platform name to be given to the
  52. native build system to choose a compiler or SDK. This is supported only on
  53. specific generators::
  54. Visual Studio >= 8
  55. See native build system documentation for allowed platform names.
  56. ``-Wno-dev``
  57. Suppress developer warnings.
  58. Suppress warnings that are meant for the author of the
  59. CMakeLists.txt files. By default this will also turn off
  60. deprecation warnings.
  61. ``-Wdev``
  62. Enable developer warnings.
  63. Enable warnings that are meant for the author of the CMakeLists.txt
  64. files. By default this will also turn on deprecation warnings.
  65. ``-Werror=dev``
  66. Make developer warnings errors.
  67. Make warnings that are meant for the author of the CMakeLists.txt files
  68. errors. By default this will also turn on deprecated warnings as errors.
  69. ``-Wno-error=dev``
  70. Make developer warnings not errors.
  71. Make warnings that are meant for the author of the CMakeLists.txt files not
  72. errors. By default this will also turn off deprecated warnings as errors.
  73. ``-Wdeprecated``
  74. Enable deprecated functionality warnings.
  75. Enable warnings for usage of deprecated functionality, that are meant
  76. for the author of the CMakeLists.txt files.
  77. ``-Wno-deprecated``
  78. Suppress deprecated functionality warnings.
  79. Suppress warnings for usage of deprecated functionality, that are meant
  80. for the author of the CMakeLists.txt files.
  81. ``-Werror=deprecated``
  82. Make deprecated macro and function warnings errors.
  83. Make warnings for usage of deprecated macros and functions, that are meant
  84. for the author of the CMakeLists.txt files, errors.
  85. ``-Wno-error=deprecated``
  86. Make deprecated macro and function warnings not errors.
  87. Make warnings for usage of deprecated macros and functions, that are meant
  88. for the author of the CMakeLists.txt files, not errors.