Giter Club home page Giter Club logo

cmake's Introduction

CMake Modules

This repository contains common CMake modules. To use it, create a .gitexternals in your project:

# -*- mode: cmake -*-
# CMake/common https://github.com/Eyescale/CMake.git master

Copy GitExternal from this repository to CMake/, and use it in your top-level CMakeLists.txt:

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake
                              ${PROJECT_SOURCE_DIR}/CMake/common)
include(GitExternal)
include(Common)

Documentation

  • Common does a common CMake setup, including:

    • CommonLibrary common_library function to build a shared library using a standard recipe.
    • CommonApplication common_application function to build an application using a standard recipe.
    • CommonCode generates standard header files for the project (api.h, defines.h, version.h).
    • GNUModules: module target to create a GNUModules module and snapshot targets to create GNU modules.
    • GitTargets branch, cut, tag, erase, retag, tarball targets.
    • Compiler: Default compiler flags, useful default warnings and 'safe' C++11 features.
    • GitInfo sets variables with information about the git source tree.
  • CommonCTest does a common CTest setup, including

    • Automatically adding all .cpp files as tests
    • Coverage Create code coverage report as html, if ENABLE_COVERAGE is set. Buildyard has 'make Coverage' target to enable this in a separate build, since coverage flags may break downstream projects.
    • CppcheckTargets: cppcheck target for static code analysis. Also adds all cppcheck targets to tests.
    • clangcheckTargets: clangcheck target for clang-check code analysis. Adds all cppcheck targets to tests if ENABLE_CLANGCHECK_TESTS is set.
  • DoxygenRule: doxygen target to build documentation into PROJECT_BINARY_DIR/doc. Optional doxygit target to copy result to ../GITHUB_ORGANIZATION/Project-M.m/. Must be included after all targets.

  • SubProject: Using a top level simple CMake superproject, several CMake subprojects (which may depend on each other) can be build. Each subproject can be added to the superproject with an add_subdirectory( subproject ) directive. To use the SubProject feature, the sub projects should modify their CMake scripts. In the scripts CMAKE_BINARY_DIR should be changed to PROJECT_BINARY_DIR and CMAKE_SOURCE_DIR should be changed to PROJECT_SOURCE_DIR. A sample project can be found at https://github.com/bilgili/SubProjects.git

  • Find scripts for non-CMake projects.

cmake's People

Contributors

eile avatar tribal-tec avatar biddisco avatar purplekarrot avatar delalond avatar marwan-abdellah avatar dardok avatar cstalder avatar brunomaga avatar lguyot avatar delyas avatar yarda avatar

Watchers

James Cloos avatar chenxinghua 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.