Giter Club home page Giter Club logo

cmake_project_template's Introduction

This is an example project using CMake.

The requirements are:

  • CMake 3.12 or better; 3.14+ highly recommended.
  • A C++11 compatible compiler
  • Git
  • Doxygen (optional)

Configure and build:

cmake -S . -B build

Add -GNinja if you have Ninja.

To build:

cmake --build build

To test (--target can be written as -t in CMake 3.15+):

cmake --build build --target test

To build docs (requires Doxygen, output in build/docs/html):

cmake --build build --target docs

Project structure

- example
  - .clang-format
  - .gitignore
  - README.md
  - LICENSE.md
  - CMakeLists.txt
  - cmake
    - FindSomeLib.cmake
    - AddGoogleTest.cmake
  - include
    - libexample
      - example.h
  - src
    - CMakeLists.txt
    - example.cpp
  - apps
    - CMakeLists.txt
    - app1
      - app1.cpp
    - app2
      - app2.cpp
    - app3
      - app3.cpp
  - tests
    - CMakeLists.txt
    - auto
    - manual
    - unit
      - CMakeLists.txt
      - testlib.cpp
  - docs
    - CMakeLists.txt
  - extern
    - CMakeLists.txt
  - scripts
    - setup.py

src folder:

  • 1.Components
- src
  - CMakeLists.txt
  - lib1
    - lib1.cpp
  - lib2
    - lib2.cpp
  - lib3
    - lib3.cpp
  • 2.Nested-Dependencies
- src
  - lib1
    - CMakeLists.txt
    - lib1.cpp
  - lib2
    - CMakeLists.txt
    - lib2.cpp
  - lib3
    - CMakeLists.txt
    - lib3.cpp
  - ...

extern folder

The extern folder should contain git submodules almost exclusively.

cmake_project_template's People

Contributors

yuriyoung avatar

Stargazers

 avatar

Watchers

 avatar

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.