CMP0005.rst 1.2 KB

123456789101112131415161718192021222324252627
  1. CMP0005
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: REMOVED_PROLOGUE.txt
  5. Preprocessor definition values are now escaped automatically.
  6. This policy determines whether or not CMake should generate escaped
  7. preprocessor definition values added via add_definitions. CMake
  8. versions 2.4 and below assumed that only trivial values would be given
  9. for macros in add_definitions calls. It did not attempt to escape
  10. non-trivial values such as string literals in generated build rules.
  11. CMake versions 2.6 and above support escaping of most values, but
  12. cannot assume the user has not added escapes already in an attempt to
  13. work around limitations in earlier versions.
  14. The ``OLD`` behavior for this policy is to place definition values given
  15. to add_definitions directly in the generated build rules without
  16. attempting to escape anything. The ``NEW`` behavior for this policy is to
  17. generate correct escapes for all native build tools automatically.
  18. See documentation of the ``COMPILE_DEFINITIONS`` target property for
  19. limitations of the escaping implementation.
  20. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
  21. .. |WARNED_OR_DID_NOT_WARN| replace:: warned
  22. .. include:: REMOVED_EPILOGUE.txt