Skip to content

Commit 6a19863

Browse files
committed
Add doc for build_info()
1 parent 34395fc commit 6a19863

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Build Info
3+
description: Using git_find_version_tag
4+
keywords: debug, debugging, build info, cmake
5+
author: RSP Systems A/S
6+
---
7+
8+
# Build Info
9+
10+
The `build_info()` function dumps build information about the current build.
11+
It accepts the following parameter:
12+
13+
* < mode >: (_option_), _cmake [message mode](https://cmake.org/cmake/help/latest/command/message.html#general-messages), e.g. `WARNING`, `NOTICE`, `STATUS`, ...etc._
14+
_Defaults to `NOTICE` is mode is not specified._
15+
* `OUTPUT`: (_optional_), _output variable. If specified, message is assigned to variable, instead of being printed to `stdout` or `stderr`._
16+
17+
## Example
18+
19+
```cmake
20+
set(LIB_TYPE "SHARED")
21+
22+
build_info()
23+
```
24+
25+
Outputs a message similar to this (_not all properties are shown in example_):
26+
27+
```txt
28+
build info:
29+
Type: Debug
30+
Library Type: SHARED
31+
Compiler flags: ...
32+
Compiler cxx debug flags: ...
33+
Compiler cxx release flags: ...
34+
Compiler cxx min size flags: ...
35+
Compiler cxx flags: ...
36+
```

0 commit comments

Comments
 (0)