Skip to content

Commit 02b00e8

Browse files
committed
Add doc. for gcc_version()
1 parent 8b06262 commit 02b00e8

File tree

1 file changed

+15
-1
lines changed
  • docs/+current/modules/compiler

1 file changed

+15
-1
lines changed

docs/+current/modules/compiler/gcc.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,18 @@ set(my_compile_options "${RSP_GCC_STRICT_COMPILE_OPTIONS}")
3636
3737
# Modify your preset...
3838
list(REMOVE_ITEM my_compile_options "-Wswitch-default")
39-
```
39+
```
40+
41+
## `gcc_version()`
42+
43+
**Available Since: `v0.2.0`**
44+
45+
Obtains the installed GCC version. The function accepts the following parameters:
46+
47+
* `OUTPUT`: _Output variable to assign the result to._
48+
49+
```cmake
50+
gcc_version(OUTPUT version)
51+
52+
message("GCC: ${version}") # 14.2.0
53+
```

0 commit comments

Comments
 (0)