cmDocumentGeneratorExpressions.h 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2010 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmDocumentGeneratorExpressions_h
  11. #define cmDocumentGeneratorExpressions_h
  12. #define CM_DOCUMENT_ADD_TEST_GENERATOR_EXPRESSIONS \
  13. "Generator expressions are evaluted during build system generation " \
  14. "to produce information specific to each build configuration. " \
  15. "Valid expressions are:\n" \
  16. " $<0:...> = empty string (ignores \"...\")\n" \
  17. " $<1:...> = content of \"...\"\n" \
  18. " $<CONFIG:cfg> = '1' if config is \"cfg\", else '0'\n" \
  19. " $<CONFIGURATION> = configuration name\n" \
  20. " $<BOOL:...> = '1' if the '...' is true, else '0'\n" \
  21. " $<STREQUAL:a,b> = '1' if a is STREQUAL b, else '0'\n" \
  22. " $<ANGLE-R> = A literal '>'. Used to compare " \
  23. "strings which contain a '>' for example.\n" \
  24. " $<COMMA> = A literal ','. Used to compare " \
  25. "strings which contain a ',' for example.\n" \
  26. " $<TARGET_NAME:...> = Marks ... as being the name of a " \
  27. "target. This is required if exporting targets to multiple " \
  28. "dependent export sets. The '...' must be a literal name of a " \
  29. "target- it may not contain generator expressions.\n" \
  30. " $<INSTALL_INTERFACE:...> = content of \"...\" when the property " \
  31. "is exported using install(EXPORT), and empty otherwise.\n" \
  32. " $<BUILD_INTERFACE:...> = content of \"...\" when the property " \
  33. "is exported using export(), or when the target is used by another " \
  34. "target in the same buildsystem. Expands to the empty string " \
  35. "otherwise.\n" \
  36. " $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \
  37. " $<TARGET_DEFINED:tgt> = '1' if tgt is a target, else '0'\n" \
  38. " $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \
  39. " $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)\n" \
  40. "where \"tgt\" is the name of a target. " \
  41. "Target file expressions produce a full path, but _DIR and _NAME " \
  42. "versions can produce the directory and file name components:\n" \
  43. " $<TARGET_FILE_DIR:tgt>/$<TARGET_FILE_NAME:tgt>\n" \
  44. " $<TARGET_LINKER_FILE_DIR:tgt>/$<TARGET_LINKER_FILE_NAME:tgt>\n" \
  45. " $<TARGET_SONAME_FILE_DIR:tgt>/$<TARGET_SONAME_FILE_NAME:tgt>\n" \
  46. "\n" \
  47. " $<TARGET_PROPERTY:tgt,prop> = The value of the property prop " \
  48. "on the target tgt.\n" \
  49. "Note that tgt is not added as a dependency of the target this " \
  50. "expression is evaluated on.\n" \
  51. " $<LINKED:item> = An empty string if item is not a " \
  52. "target. If item is a target then the " \
  53. "INTERFACE_INCLUDE_DIRECTORIES or INTERFACE_COMPILE_DEFINITIONS " \
  54. "content is read from the target. " \
  55. "This generator expression can only be used in evaluation of the " \
  56. "INCLUDE_DIRECTORIES or COMPILE_DEFINITIONS property. Note that " \
  57. "this expression is for internal use and may be changed or removed " \
  58. "in the future.\n" \
  59. " $<TARGET_POLICY:pol> = '1' if the policy was NEW when " \
  60. "the 'head' target was created, else '0'. If the policy was not " \
  61. "set, the warning message for the policy will be emitted. This " \
  62. "generator expression only works for a subset of policies.\n" \
  63. " $<INSTALL_PREFIX> = Content of the install prefix when " \
  64. "the target is exported via INSTALL(EXPORT) and empty otherwise.\n" \
  65. "Boolean expressions:\n" \
  66. " $<AND:?[,?]...> = '1' if all '?' are '1', else '0'\n" \
  67. " $<OR:?[,?]...> = '0' if all '?' are '0', else '1'\n" \
  68. " $<NOT:?> = '0' if '?' is '1', else '1'\n" \
  69. "where '?' is always either '0' or '1'.\n" \
  70. ""
  71. #define CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS \
  72. CM_DOCUMENT_ADD_TEST_GENERATOR_EXPRESSIONS \
  73. "Expressions with an implicit 'this' target:\n" \
  74. " $<TARGET_PROPERTY:prop> = The value of the property prop on " \
  75. "the target on which the generator expression is evaluated.\n" \
  76. ""
  77. #endif