|
2 | 2 | ------ |
3 | 3 | The files node defines a group of files that all share the same attributes, including relative directory, default compiler flags and dependencies. The node can be used to define a set of header files on which other files can depend, or a set of source files to be compiled and included in a target. |
4 | 4 |
|
| 5 | +```xml |
| 6 | +<files id="foo" cxx_standard="14"> |
| 7 | + <file name="foo.cpp"/> |
| 8 | + <file name="bar.c"/> |
| 9 | +</files> |
| 10 | +``` |
| 11 | + |
| 12 | +#### Attributes |
| 13 | + |
| 14 | + + `c_standard` = Default C standard for the file group |
| 15 | + + `cxx_standard` = Default C++ standard for the file group |
| 16 | + + `objc_standard` = Default Objective-C standard for the file group |
| 17 | + + `objcxx_standard` = Default Objective-C++ standard for the file group |
| 18 | +#### Nodes |
5 | 19 | - *depend* - Declare that all files in the group depend on another file or another file group. |
6 | 20 | ```xml |
7 | 21 | <depend name="filename" /> |
@@ -80,13 +94,17 @@ The files node defines a group of files that all share the same attributes, incl |
80 | 94 |
|
81 | 95 | - *file* - Add file to group, with optional attributes |
82 | 96 | ```xml |
83 | | - <file name="filename" tags="tag,tag1" filterout="define" embedName="embed" > |
| 97 | + <file name="filename" tags="tag,tag1" filterout="define" embedName="embed" cxx_standard="17"> |
84 | 98 | <depend name="filename1" /> |
85 | 99 | <depend name="filename2" /> |
86 | 100 | </file> |
87 | 101 | ``` |
88 | 102 | + name = name of file - may be absolute or relative to files.dir |
89 | 103 | + tags = optional override of group tags. See [Tags.md](Tags.md). |
| 104 | + + `c_standard` = C standard for the file |
| 105 | + + `cxx_standard` = C++ standard for the file |
| 106 | + + `objc_standard` = Objective-C standard for the file |
| 107 | + + `objcxx_standard` = Objective-C++ standard for the file |
90 | 108 | + filterout = allows files to be skipped at compile-time if the named define exists. |
91 | 109 | This is useful when the define is set sometime after the file list is parsed. |
92 | 110 | + depend name = filename of additional dependency |
|
0 commit comments