forked from mesonbuild/meson
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a summary() function for configuration summarization
Based on patch from Dylan Baker. Fixes mesonbuild#757
- Loading branch information
Showing
9 changed files
with
192 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Add a new summary() function | ||
|
||
A new function [`summary()`](Reference-manual.md#summary) has been added to | ||
summarize build configuration at the end of the build process. | ||
|
||
Example: | ||
```meson | ||
sec1 = {'driver' : 'foobar', 'OS' : 'Linux', 'API' : '1.7'} | ||
sec2 = {'driver' : 'dive comp', 'OS' : 'Minix', 'API' : '1.1.2'} | ||
sec3 = {'with' : {'mesa' : true, 'gbm' : false}} | ||
summary('Backend', 'OpenGL') | ||
summary('Server', sec1) | ||
summary('Client', sec2) | ||
summary('Misc', sec3) | ||
``` | ||
|
||
Output: | ||
``` | ||
Main Project: | ||
Backend = OpenGL | ||
Server | ||
driver = 'foobar' | ||
OS = 'Linux' | ||
API = '1.7' | ||
Client | ||
driver = 'dive comp' | ||
OS = 'Minix' | ||
API = '1.1.2' | ||
Misc | ||
with = {'mesa' : True, 'gbm' : False} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
project('test summary') | ||
|
||
sec1 = {'driver' : 'foobar', 'OS' : 'Linux', 'API' : '1.7'} | ||
sec2 = {'driver' : 'dive comp', 'OS' : 'Minix', 'API' : '1.1.2'} | ||
sec3 = {'with' : {'mesa' : true, 'gbm' : false}} | ||
|
||
summary('Backend', 'OpenGL') | ||
summary('Server', sec1) | ||
summary('Client', sec2) | ||
summary('Misc', sec3) | ||
|
||
subproject('sub') | ||
subproject('sub2', required : false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
project('test summary subproject') | ||
|
||
summary('Features', {'compiled': ['foo', 'bar']}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project('sub2') | ||
|
||
error('This subproject failed') | ||
|
||
summary('Section', 'Should not be seen') |