Skip to content
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

Include sketch directory to include search path #354

Closed
luni64 opened this issue May 5, 2020 · 1 comment
Closed

Include sketch directory to include search path #354

luni64 opened this issue May 5, 2020 · 1 comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@luni64
Copy link

luni64 commented May 5, 2020

When doing libraries with project scope settings I usually do something like

config.h:

#pragma once

#if __has_include("userConfig.h")
    #include "userConfig.h"
#else
    #include "defaultConfig.h"
#endif

If the user want's to override the default settings he can copy defaultConfig.h to the sketch folder and rename it to userConfig.h. Settings will then be read from userConfig.h which works perfectly with platformIO and makefile builds.

However, looks like the Arduino builder doesn't include the sketch folder in the search path for include files, so this pattern doesn't work with the Arduino IDE.

Proposal: Include the sketch folder in the search path

@per1234
Copy link
Contributor

per1234 commented Sep 30, 2021

Thanks for taking the time to submit an issue @luni64.

I see we already have a prior issue report about this at arduino/Arduino#2547 (which seems to have been considered equivalent to the discussion of an alternative proposal at #15).

It's best to have only a single issue per subject so we can consolidate all relevant discussion to one place, so I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants