Skip to content

Commit d98ead9

Browse files
committed
report GCC version
1 parent ccb4336 commit d98ead9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
88
### Added
9+
- `CppLibrary` can now report `gcc_version`
910

1011
### Changed
1112

lib/arduino_ci/cpp_library.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ def run_gcc(*args, **kwargs)
127127
success
128128
end
129129

130+
# Return the GCC version
131+
# @return [String] the version reported by `gcc -v`
132+
def gcc_version
133+
return nil unless run_gcc("-v")
134+
@last_err
135+
end
136+
130137
# GCC command line arguments for including aux libraries
131138
# @param aux_libraries [String] The external Arduino libraries required by this project
132139
# @return [Array<String>] The GCC command-line flags necessary to include those libraries

0 commit comments

Comments
 (0)