Skip to content

Please add .cc and .cxx to OTHER_ALLOWED_EXTENSIONS #1149

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

Closed
raybellis opened this issue Jan 22, 2021 · 4 comments · Fixed by #2273
Closed

Please add .cc and .cxx to OTHER_ALLOWED_EXTENSIONS #1149

raybellis opened this issue Jan 22, 2021 · 4 comments · Fixed by #2273
Assignees
Labels
conclusion: resolved Issue was resolved topic: build-process Related to the sketch build process type: enhancement Proposed improvement

Comments

@raybellis
Copy link

When using third party C++ code not originally targeting the Arduino it is not uncommon to find those source files with a ".cc" or ".cxx" extension.

These are currently unusable since the builder doesn't copy those files from src/* into the temporary build tree.

Please add those to the list of recognised source code extensions for C++ code.

@per1234 per1234 transferred this issue from arduino/Arduino Jan 22, 2021
@per1234
Copy link
Contributor

per1234 commented Jan 22, 2021

Just for the sake of linking related feature requests together, I'll mention https://github.com/arduino/arduino-builder/issues/268 here.

@raybellis
Copy link
Author

Oops, not sure how this ended up in arduino-cli instead of the core UI repository!

@per1234
Copy link
Contributor

per1234 commented Jan 22, 2021

Hi @raybellis. I transferred it to this repository because this is where the code that would need to be changed to implement your request lives. To be specific, here:

// AdditionalFileValidExtensions lists any file extension the builder considers as valid
AdditionalFileValidExtensions = map[string]struct{}{
".h": empty,
".c": empty,
".hpp": empty,
".hh": empty,
".cpp": empty,
".s": empty,
}
// SourceFilesValidExtensions lists valid extensions for source files (no headers)
SourceFilesValidExtensions = map[string]struct{}{
".c": empty,
".cpp": empty,
".s": empty,
}
)

The builder system has gradually been moved out of the Arduino IDE's Java codebase, first into arduino-builder, and now to its final home here in Arduino CLI. From here, it can be used by all the official (and 3rd party as well if they like) Arduino development software, including Arduino IDE, Arduino Web Editor, Arduino Pro IDE, and of course Arduino CLI itself.

@chenzhuoyu
Copy link

Any updates? @raybellis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: build-process Related to the sketch build process type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants