COMPILE_DEFINITIONS.rst 1.0 KB

1234567891011121314151617181920212223
  1. COMPILE_DEFINITIONS
  2. -------------------
  3. Preprocessor definitions for compiling a target's sources.
  4. The COMPILE_DEFINITIONS property may be set to a semicolon-separated
  5. list of preprocessor definitions using the syntax VAR or VAR=value.
  6. Function-style definitions are not supported. CMake will
  7. automatically escape the value correctly for the native build system
  8. (note that CMake language syntax may require escapes to specify some
  9. values). This property may be set on a per-configuration basis using
  10. the name COMPILE_DEFINITIONS_<CONFIG> where <CONFIG> is an upper-case
  11. name (ex. "COMPILE_DEFINITIONS_DEBUG").
  12. CMake will automatically drop some definitions that are not supported
  13. by the native build tool. The VS6 IDE does not support definition
  14. values with spaces (but NMake does).
  15. Contents of COMPILE_DEFINITIONS may use "generator expressions" with the
  16. syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
  17. for available expressions.
  18. .. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.txt