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
93 stars 8 forks source link

Recognize .cxx as a valid c++ source file extension #1113

Open premsair opened 6 months ago

premsair commented 6 months ago

Current Behavior

Gradle core cpp-library, cpp-application and cpp-unit-test plugins does not recognize .cxx as a valid c++ file extension and does not compile the sources that end with .cxx when source property on component (library or application extensions) is configured since the source is further filtered for "**/*.cpp", "**/*.c++", "**/*.cc" files

GCC does recognize .cxx as a valid c++ file extension

The workaround is to configure the compileTask.source property directly but this is not desired since this takes away the abstraction provided by the component source property

Expected Behavior

in a given src directory (src/main/cpp) recognize .cxx files as c++ source and pass the source for compilation to compile task

Context (optional)

No response

Steps to Reproduce

setup a project with cpp source files that end with .cxx <projectDir>/src/main/cpp/a.cxx

In build.gradle plugins { id 'cpp-library' }

Gradle version

7.3.3

Build scan URL (optional)

No response

Your Environment (optional)

No response

ljacomet commented 6 months ago

Native support in Gradle is currently not an area of focus. There is no ETA on implementing this.