Giter Site home page Giter Site logo

chipscal / power_cmake Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 48 KB

An automatic cmake build system that can be used to easily build libraries, ctests and documentation by just defining simply manifest files.

License: MIT License

CMake 86.47% C++ 11.88% C 1.66%
cmake-template c-plus-plus c

power_cmake's Introduction

Power cmake

Cmake project automated build system. By using this build system is possible to:

  • configure and build multiple libraries (static and shared)
  • configure and auto execute for each target library several tests
  • install libraries, tests and documentation into your INSTALL_ROOT
  • it supports either Windows and Linux/Unix

Getting started

In order to start a manifest.cmake file has to be specified inside the ROOT. This file has to set at least the following variables:

  • PROJ_NAME: name of your project
  • PROJ_AUTHOR: author(s) of the project
  • PROJ_AUTHOR_EMAIL: email(s) of the author(s) Inside the ROOT a folder with the same name of the project has to be created.

In order to create a new target library it is necessary to:

  • create a subfolder inside ROOT/project folder with the following structure:
    • src/
      • *.cpp, *.h, *.hpp (sources and only private headers * not installed)
    • tests/
      • test0: (Optionally)
        • *.cpp, *.h, *.hpp
        • testmanifest.cmake
      • ...
    • libmanifest.cmake
    • *.h, *.hpp (public headers)

A library is defined using a libmanifest.cmake file that has to specify at least:

  • LIBRARY_NAME: the name of the library
  • LIBRARY_TYPE: SHARED or STATIC
  • LIBRARY_MAJOR: library major number
  • LIBRARY_MINOR: library minor number

In order to import dependencies you may use this file to find packages and append the package include directories and objects respectively into:

  • LIBRARY_INCLUDE_DIRS
  • LIBRARY_LINKED_OBJECTS

Inside the test folder a testmanifest.cmake has to be created and must specify:

  • TEST_NAME: the test name
  • TEST_ARGS: test arguments

All the library dependencies are automatically included into the test. If other packages are neaded it is possible to use the testmanifest in order to find packages and to append their include direcoteries and objects respectively inside:

  • TEST_ADDITIONAL_INCLUDE_DIR
  • TEST_ADDITIONAL_LINKED_OBJECTS

The project is configured to build the documentation using Doxygen (if present). The doxyfile is already configured to use as mainpage this README.md, so you can start to describe your project from this file.

The install scripts will provide to copy into the install folder either the README.md and the LICENSE.md files.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

power_cmake's People

Contributors

chipscal 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.