Skip to content

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

@premsair

Description

@premsair

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions