gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
91 stars 8 forks source link

Consider .hpp and .hxx files to be header files too (C++) #1079

Open BrainStone opened 3 years ago

BrainStone commented 3 years ago

Expected Behavior

Consider all 3 common C++ header endings as valid header file endings: .h, .hpp and .hxx

Current Behavior

Currently the plugin is hardcoded to only use .h files: https://github.com/gradle/gradle/blob/ea650c049886424271b3583cc57ba260458f68c0/subprojects/language-native/src/main/java/org/gradle/language/cpp/internal/DefaultCppComponent.java#L112

Context

Other plugins trying to find the header files (like the VisualStudio plugin) will only get a list of files with the .h ending when they try to get a list of all header files.

lacasseio commented 3 years ago

Thanks for opening this issue. Nokee also consider h++ extension as being C++ headers. However, we also allow this default value to be configurable.

BrainStone commented 3 years ago

Yeah you are right. The .h++ extension should be supported as well.

abelavusau commented 11 months ago

Hello,

What's about concidering *.ipp files as well?