The result of this bug is needed dependencies are not included, resulting in compile errors.
I've only verified this when using the generate_arduino_example( ) syntax, but I expect it applies to other cases.
In short, if the myExample.ino file has an #include directive for an Arduino library header file and the directive has trailing whitespace or a trailing comment, the REGEX used in:
This simple fix of appending .* allows any trailing characters, so it doesn't enforce the language syntax, but that is fine. Arduino-cmake can take care of including the dependencies and the compiler can pick up syntax errors since users are accustomed to silly formatting errors that are caught by the compiler.
The result of this bug is needed dependencies are not included, resulting in compile errors.
I've only verified this when using the generate_arduino_example( ) syntax, but I expect it applies to other cases.
In short, if the myExample.ino file has an #include directive for an Arduino library header file and the directive has trailing whitespace or a trailing comment, the REGEX used in:
does not match it, so that library doesn't get added to the includes.
A simple fix is to replace the line with:
This simple fix of appending
.*
allows any trailing characters, so it doesn't enforce the language syntax, but that is fine. Arduino-cmake can take care of including the dependencies and the compiler can pick up syntax errors since users are accustomed to silly formatting errors that are caught by the compiler.