-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automatic inclusion of sketch_globals.h
for sketch.ino
and libraries
#1524
base: master
Are you sure you want to change the base?
Conversation
I'd suggest renaming to:
|
proj_globals.h
for proj.ino
and librariessketch_globals.h
for sketch.ino
and libraries
Before merging this, please consider the long term effect on the Arduino ecosystem. Historically, Arduino has rejected this idea. If it's now considered okay, then great. |
I can't see any adverse effect for backward compatibility. |
Having a single |
I think a way for using global defines is really lacking in the Arduino build system for a user point of view, in the same sense where in any other build environment that I know of, there is always a place where one can add some custom #defines, which are enabled in a global manner. Allowing to use a separate and distinct file per library is an interesting idea, which indeed would avoid name clashing. Having a single file named after user's sketch appears more simple to me, and sticks to the Arduino simplicity. About library name clashing, this is indeed an issue. |
before creating one)
our contributing guidelines
User is given the ability to add local overriding for cpp-defines used by sketch and libraries.
This is done through a new and optional user file editable from Arduino-GUI and which must stand beside
someSketch.ino
under the namesomeSketch_globals.h
.When it exists, this file is automatically included first in all compilation units (
.ino
,.cpp
) through the compiler's-include file
command line option.This is yet another proposal for #846 and arduino/Arduino#421, and follows #1117 and #1517.
Features:
follows #1517 (comment) .