OPTIONS_BUILD.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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-spec>``
  41. Toolset specification for the generator, if supported.
  42. Some CMake generators support a toolset specification to tell
  43. the native build system how to choose a compiler. See the
  44. :variable:`CMAKE_GENERATOR_TOOLSET` variable for details.
  45. ``-A <platform-name>``
  46. Specify platform name if supported by generator.
  47. Some CMake generators support a platform name to be given to the
  48. native build system to choose a compiler or SDK. See the
  49. :variable:`CMAKE_GENERATOR_PLATFORM` variable for details.
  50. ``-Wno-dev``
  51. Suppress developer warnings.
  52. Suppress warnings that are meant for the author of the
  53. CMakeLists.txt files. By default this will also turn off
  54. deprecation warnings.
  55. ``-Wdev``
  56. Enable developer warnings.
  57. Enable warnings that are meant for the author of the CMakeLists.txt
  58. files. By default this will also turn on deprecation warnings.
  59. ``-Werror=dev``
  60. Make developer warnings errors.
  61. Make warnings that are meant for the author of the CMakeLists.txt files
  62. errors. By default this will also turn on deprecated warnings as errors.
  63. ``-Wno-error=dev``
  64. Make developer warnings not errors.
  65. Make warnings that are meant for the author of the CMakeLists.txt files not
  66. errors. By default this will also turn off deprecated warnings as errors.
  67. ``-Wdeprecated``
  68. Enable deprecated functionality warnings.
  69. Enable warnings for usage of deprecated functionality, that are meant
  70. for the author of the CMakeLists.txt files.
  71. ``-Wno-deprecated``
  72. Suppress deprecated functionality warnings.
  73. Suppress warnings for usage of deprecated functionality, that are meant
  74. for the author of the CMakeLists.txt files.
  75. ``-Werror=deprecated``
  76. Make deprecated macro and function warnings errors.
  77. Make warnings for usage of deprecated macros and functions, that are meant
  78. for the author of the CMakeLists.txt files, errors.
  79. ``-Wno-error=deprecated``
  80. Make deprecated macro and function warnings not errors.
  81. Make warnings for usage of deprecated macros and functions, that are meant
  82. for the author of the CMakeLists.txt files, not errors.