Skip to content

Add CMake configuration to build without the Arduino IDE#66

Open
chrisa wants to merge 12 commits intoSvenRosvall:mainfrom
chrisa:cmake-arduino
Open

Add CMake configuration to build without the Arduino IDE#66
chrisa wants to merge 12 commits intoSvenRosvall:mainfrom
chrisa:cmake-arduino

Conversation

@chrisa
Copy link
Copy Markdown

@chrisa chrisa commented Nov 21, 2023

This allows VLCB sketches to be built entirely with cmake, without the Arduino IDE but still using the Arduino SDK.

  • tests may be built with Clang's sanitizers, and pass cleanly.
  • testAll exits non-zero on failure, for use with ctest.
  • all example sketches are buildable with CMake.

See build-all.sh for cmake command lines.

@dpharris
Copy link
Copy Markdown
Collaborator

dpharris commented Nov 21, 2023 via email

test/testAll.cpp Outdated
}
}
return 0;
return failures;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to print out a message with the failure count if there are any failures.

This allows VLCB sketches to be built entirely with cmake, without
the Arduino IDE, but still using the Arduino SDK.

Based on https://github.com/tttapa/Arduino-AVR-CMake.

Tests are built for the host, and run with ctest.
All examples build, and Bounce2 library added.
This change means that whether building for test or AVR, the
targets configured by CMake are appropriate.

Now, running make in the AVR build directory will build _all_
of the sketches configured in the top-level CMakeLists.txt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants