Skip to content

Commit 5351b02

Browse files
authored
Merge pull request Arduino-CI#186 from jgfoster/arv
Add `__AVR__` to defines to match Arduino IDE compiler
2 parents 6eee41a + a299603 commit 5351b02

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99
### Added
10+
- Add `__AVR__` to defines when compiling
1011

1112
### Changed
1213
- Move repository from https://github.com/ianfixes/arduino_ci to https://github.com/Arduino-CI/arduino_ci

lib/arduino_ci/cpp_library.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def build_for_test_with_configuration(test_file, aux_libraries, gcc_binary, ci_g
324324
executable = Pathname.new("unittest_#{base}.bin").expand_path
325325
File.delete(executable) if File.exist?(executable)
326326
arg_sets = []
327-
arg_sets << ["-std=c++0x", "-o", executable.to_s, "-DARDUINO=100"]
327+
arg_sets << ["-std=c++0x", "-o", executable.to_s, "-DARDUINO=100", "-D__AVR__"]
328328
if libasan?(gcc_binary)
329329
arg_sets << [ # Stuff to help with dynamic memory mishandling
330330
"-g", "-O1",

0 commit comments

Comments
 (0)