1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2010 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmDocumentGeneratorExpressions_h
13 #define cmDocumentGeneratorExpressions_h
15 #define CM_DOCUMENT_ADD_TEST_GENERATOR_EXPRESSIONS \
16 "Generator expressions are evaluated during build system generation " \
17 "to produce information specific to each build configuration. " \
18 "Valid expressions are:\n" \
19 " $<0:...> = empty string (ignores \"...\")\n" \
20 " $<1:...> = content of \"...\"\n" \
21 " $<CONFIG:cfg> = '1' if config is \"cfg\", else '0'\n" \
22 " $<CONFIGURATION> = configuration name\n" \
23 " $<BOOL:...> = '1' if the '...' is true, else '0'\n" \
24 " $<STREQUAL:a,b> = '1' if a is STREQUAL b, else '0'\n" \
25 " $<ANGLE-R> = A literal '>'. Used to compare " \
26 "strings which contain a '>' for example.\n" \
27 " $<COMMA> = A literal ','. Used to compare " \
28 "strings which contain a ',' for example.\n" \
29 " $<SEMICOLON> = A literal ';'. Used to prevent " \
30 "list expansion on an argument with ';'.\n" \
31 " $<JOIN:list,...> = joins the list with the content of " \
33 " $<TARGET_NAME:...> = Marks ... as being the name of a " \
34 "target. This is required if exporting targets to multiple " \
35 "dependent export sets. The '...' must be a literal name of a " \
36 "target- it may not contain generator expressions.\n" \
37 " $<INSTALL_INTERFACE:...> = content of \"...\" when the property " \
38 "is exported using install(EXPORT), and empty otherwise.\n" \
39 " $<BUILD_INTERFACE:...> = content of \"...\" when the property " \
40 "is exported using export(), or when the target is used by another " \
41 "target in the same buildsystem. Expands to the empty string " \
43 " $<C_COMPILER_ID> = The CMake-id of the C compiler " \
45 " $<C_COMPILER_ID:comp> = '1' if the CMake-id of the C " \
46 "compiler matches comp, otherwise '0'.\n" \
47 " $<CXX_COMPILER_ID> = The CMake-id of the CXX compiler " \
49 " $<CXX_COMPILER_ID:comp> = '1' if the CMake-id of the CXX " \
50 "compiler matches comp, otherwise '0'.\n" \
51 " $<VERSION_GREATER:v1,v2> = '1' if v1 is a version greater than " \
53 " $<VERSION_LESS:v1,v2> = '1' if v1 is a version less than v2, " \
55 " $<VERSION_EQUAL:v1,v2> = '1' if v1 is the same version as v2, " \
57 " $<C_COMPILER_VERSION> = The version of the C compiler used.\n" \
58 " $<C_COMPILER_VERSION:ver> = '1' if the version of the C " \
59 "compiler matches ver, otherwise '0'.\n" \
60 " $<CXX_COMPILER_VERSION> = The version of the CXX compiler " \
62 " $<CXX_COMPILER_VERSION:ver> = '1' if the version of the CXX " \
63 "compiler matches ver, otherwise '0'.\n" \
64 " $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \
65 " $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \
66 " $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)\n" \
67 "where \"tgt\" is the name of a target. " \
68 "Target file expressions produce a full path, but _DIR and _NAME " \
69 "versions can produce the directory and file name components:\n" \
70 " $<TARGET_FILE_DIR:tgt>/$<TARGET_FILE_NAME:tgt>\n" \
71 " $<TARGET_LINKER_FILE_DIR:tgt>/$<TARGET_LINKER_FILE_NAME:tgt>\n" \
72 " $<TARGET_SONAME_FILE_DIR:tgt>/$<TARGET_SONAME_FILE_NAME:tgt>\n" \
74 " $<TARGET_PROPERTY:tgt,prop> = The value of the property prop " \
75 "on the target tgt.\n" \
76 "Note that tgt is not added as a dependency of the target this " \
77 "expression is evaluated on.\n" \
78 " $<TARGET_POLICY:pol> = '1' if the policy was NEW when " \
79 "the 'head' target was created, else '0'. If the policy was not " \
80 "set, the warning message for the policy will be emitted. This " \
81 "generator expression only works for a subset of policies.\n" \
82 " $<INSTALL_PREFIX> = Content of the install prefix when " \
83 "the target is exported via INSTALL(EXPORT) and empty otherwise.\n" \
84 "Boolean expressions:\n" \
85 " $<AND:?[,?]...> = '1' if all '?' are '1', else '0'\n" \
86 " $<OR:?[,?]...> = '0' if all '?' are '0', else '1'\n" \
87 " $<NOT:?> = '0' if '?' is '1', else '1'\n" \
88 "where '?' is always either '0' or '1'.\n" \
91 #define CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS \
92 CM_DOCUMENT_ADD_TEST_GENERATOR_EXPRESSIONS \
93 "Expressions with an implicit 'this' target:\n" \
94 " $<TARGET_PROPERTY:prop> = The value of the property prop on " \
95 "the target on which the generator expression is evaluated.\n" \