OPTIONS_BUILD.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. * ``-C <initial-cache>``: Pre-load a script to populate the cache.
  2. When cmake is first run in an empty build tree, it creates a
  3. CMakeCache.txt file and populates it with customizable settings for
  4. the project. This option may be used to specify a file from which
  5. to load cache entries before the first pass through the project's
  6. cmake listfiles. The loaded entries take priority over the
  7. project's default values. The given file should be a CMake script
  8. containing SET commands that use the CACHE option, not a
  9. cache-format file.
  10. * ``-D <var>:<type>=<value>``: Create a cmake cache entry.
  11. When cmake is first run in an empty build tree, it creates a
  12. CMakeCache.txt file and populates it with customizable settings for
  13. the project. This option may be used to specify a setting that
  14. takes priority over the project's default value. The option may be
  15. repeated for as many cache entries as desired.
  16. * ``-U <globbing_expr>``: Remove matching entries from CMake cache.
  17. This option may be used to remove one or more variables from the
  18. CMakeCache.txt file, globbing expressions using * and ? are
  19. supported. The option may be repeated for as many cache entries as
  20. desired.
  21. Use with care, you can make your CMakeCache.txt non-working.
  22. * ``-G <generator-name>``: Specify a build system generator.
  23. CMake may support multiple native build systems on certain
  24. platforms. A generator is responsible for generating a particular
  25. build system. Possible generator names are specified in the
  26. Generators section.
  27. * ``-T <toolset-name>``: Specify toolset name if supported by generator.
  28. Some CMake generators support a toolset name to be given to the
  29. native build system to choose a compiler. This is supported only on
  30. specific generators:
  31. ::
  32. Visual Studio >= 10
  33. Xcode >= 3.0
  34. See native build system documentation for allowed toolset names.
  35. * ``-Wno-dev``: Suppress developer warnings.
  36. Suppress warnings that are meant for the author of the
  37. CMakeLists.txt files.
  38. * ``-Wdev``: Enable developer warnings.
  39. Enable warnings that are meant for the author of the CMakeLists.txt
  40. files.