Coder Social home page Coder Social logo

cpp-project-template's Introduction

Layout Convention

This repo uses a modified Pitchfork Layout (PFL) convention for the project layout. See especially the README link to the project layout conventions and the 2018 blog post.

The modifications to the Pitchfork standard allow the user to have some preference for directory names. The underlying file structure follows PFL. Italicized entries are the names chosen for this repo.

Pitchfork Alternatives
build _build, bld
tests test, testing
examples example, samples
external extern, third-party, deps, dependencies, exogenous
data res, resources, dat
tools scripts
docs doc, documentation
src source
include inc
libs library, units, trees, components, sections, parts, modules, subdivisions, mods, subdiv, lib, src-tree, src-trees
extras extra, optional

Each submodule under libs/ or extras/ can contain again the emboldened entries. (Here, I have also modified PFL to allow tools/ to be included in a submodule.)

Untracked/Absent Root Directories

build/

Contents from the Pitchfork standard.

Purpose

A special directory that should not be considered part of the source of the project. Used for storing ephemeral build results. must not be checked into source control. If using source control, must be ignored using source control ignore-lists.

Notes

This directory is not required, but its name should be reserved.

The build/ directory is special in that it must not be committed to a source control system. A user downloading the codebase should not see a build/ directory present in the project root, but one may be created in the course of working with the software. The _build/ directory is also reserved.

Note: Some build systems may commandeer the build/ directory for themselves. In this case, the directory _build/ should be used in place of build/.

The build/ directory may be used for ephemeral build results. Other uses of the directory are not permitted.

Creation of additional directories for build results in the root directory is not permitted.

Note: Although multiple root directories are not allowed, the structure and layout of the build/ directory is not prescribed. Multiple subdirectories of build/ may be used to hold multiple build results of different configuration.

src/

Contents from the Pitchfork standard.

Purpose

Main compilable source location. must be present for projects with compiled components that do not use submodules.

In the presence of include/, also contains private headers.

Notes

Note: The src/ and include/ directories are very closely related. Be sure to also read its section in addition to this one.

The purpose and content of src/ depends on whether the project authors choose to follow § 3.1.2 Merged Header Placement or § 3.1.1 Separate Header Placement.

See § 3 Library Source Layout.

include/

Contents from the Pitchfork standard.

Purpose

Directory for public headers. may be present. may be omitted for projects that do not distinguish between private/public headers. may be omitted for projects that use submodules.

Notes

Note: The include/ and src/ directories are very closely related. Be sure to also read its section in addition to this one.

The purpose of the include/ directory is to hold public API headers.

The include/ directory should not be used if using § 3.1.2 Merged Header Placement.

See § 3 Library Source Layout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.