You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
4.3 KiB

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