Skip to content

Commit 4887096

Browse files
committed
Add doc. for gcc_info()
1 parent 573505f commit 4887096

File tree

1 file changed

+22
-0
lines changed
  • docs/+current/modules/compiler

1 file changed

+22
-0
lines changed

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

+22
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ set(my_compile_options "${RSP_GCC_STRICT_COMPILE_OPTIONS}")
3838
list(REMOVE_ITEM my_compile_options "-Wswitch-default")
3939
```
4040

41+
## `gcc_info()`
42+
43+
**Available Since: `v0.3.0`**
44+
45+
Obtains the path and version of the installed GCC version. The function accepts the following parameters:
46+
47+
* `OUTPUT`: _Output variable to assign the result to._
48+
49+
**Output**
50+
51+
* `[OUTPUT]`: _Path to installed GCC tool._
52+
* `[OUTPUT]_VERSION`: _GCC version._
53+
54+
**Example**
55+
56+
```cmake
57+
gcc_info(OUTPUT gcc)
58+
59+
message("GCC (path): ${gcc}") # /usr/bin/g++-14
60+
message("GCC (version): ${gcc_VERSION}") # 14.2.0
61+
```
62+
4163
## `gcc_version()`
4264

4365
**Available Since: `v0.2.0`**

0 commit comments

Comments
 (0)