# Cpp plugin source file location conventions feel wrong

**URL:** <https://discuss.gradle.org/t/cpp-plugin-source-file-location-conventions-feel-wrong/2248>\
**Category:** Old Forum Archive\
**Created:** [July 10, 2013, 10:12pm UTC](https://discuss.gradle.org/t/cpp-plugin-source-file-location-conventions-feel-wrong/2248 "2013-07-10T22:12:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![daz](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/daz/32/2475_2.png) [@daz](https://discuss.gradle.org/u/daz)\
**Post date:** [July 12, 2013, 5:24am UTC](https://discuss.gradle.org/t/cpp-plugin-source-file-location-conventions-feel-wrong/2248/4 "2013-07-12T05:24:00Z")

</div>

The C++ stuff is a work in progress, and we plan to make it easy for you to just grab the language support and define your own conventions. In ‘gradle-1.7-rc-1’, you should be able to handle your proposed source layout like:

```gradle
cpp {
    sourceSets {
        main {
            source {
                srcDir "src"
                include "**/*.cpp"
            }
            // Gradle currently has no concept of 'private' headers
            exportedHeaders {
                srcDir "src"
                // There no convenient way to include headers recursively (this is a bug)
                srcDirs "include/project1", "include/project2"
         }
    }
}

```

Note that in ‘gradle-1.8’ (latest nightly) the syntax has changed slightly to: ` sources {`

main {

cpp {

source {

srcDir … etc \</code

---

_[View the full topic](https://discuss.gradle.org/t/cpp-plugin-source-file-location-conventions-feel-wrong/2248)._
