All Projects → ttroy50 → Cmake Examples

ttroy50 / Cmake Examples

Licence: mit
Useful CMake Examples

Programming Languages

CMake
9771 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects
python
139335 projects - #7 most used programming language
Roff
2310 projects

Projects that are alternatives of or similar to Cmake Examples

Cleancppproject
Clean C++ project for you to use. Features: Modern CMake, CPack, Doxygen, PlantUML, Catch Unit testing, static analysis
Stars: ✭ 276 (-96.18%)
Mutual labels:  cmake, static-analysis, unit-testing
Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (-98.49%)
Mutual labels:  cmake, clang, unit-testing
Fixed point
C++ Binary Fixed-Point Arithmetic
Stars: ✭ 199 (-97.24%)
Mutual labels:  cmake, clang, boost
Cxxctp
DEPRECATED. USE INSTEAD github.com/blockspacer/flextool
Stars: ✭ 58 (-99.2%)
Mutual labels:  cmake, static-analysis, clang
cmake-init
The missing CMake project initializer
Stars: ✭ 1,071 (-85.17%)
Mutual labels:  static-analysis, cppcheck, clang-format
catch cmake coverage
Integration of Catch, CMake and CMake CodeCoverage module and basic examples in C++.
Stars: ✭ 30 (-99.58%)
Mutual labels:  cmake, catch
Vanilla Rtb
Real Time Bidding (RTB) - Demand Side Platform framework
Stars: ✭ 257 (-96.44%)
Mutual labels:  cmake, boost
Goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report.
Stars: ✭ 2,943 (-59.24%)
Mutual labels:  static-analysis, unit-testing
Avenging
MVP pattern example on Android: no Dagger or RxJava example
Stars: ✭ 279 (-96.14%)
Mutual labels:  tutorial, unit-testing
Clang Power Tools
Bringing clang-tidy magic to Visual Studio C++ developers.
Stars: ✭ 285 (-96.05%)
Mutual labels:  static-analysis, clang
S25client
Return To The Roots (Settlers II(R) Clone)
Stars: ✭ 288 (-96.01%)
Mutual labels:  cmake, boost
cppcheck-configs
Configuration files that allow cppcheck to provide better static analysis results
Stars: ✭ 15 (-99.79%)
Mutual labels:  static-analysis, cppcheck
c-template
Boilerplate to set up a c project, include CuTest unit testing, cmake build setup
Stars: ✭ 69 (-99.04%)
Mutual labels:  cmake, cpack
Boomerang
Boomerang Decompiler - Fighting the code-rot :)
Stars: ✭ 265 (-96.33%)
Mutual labels:  cmake, clang
clang-format-editor
Clang-Format Editor is a tool that helps you find the best Clang-Format Style for your C++, C#, Java, JavaScript, and Objective-C code.
Stars: ✭ 15 (-99.79%)
Mutual labels:  clang, clang-format
Format.cmake
💅 Stylize your code! Automatic clang-format and cmake-format targets for CMake.
Stars: ✭ 94 (-98.7%)
Mutual labels:  clang, clang-format
Cppcheck
static analysis of C/C++ code
Stars: ✭ 3,845 (-46.75%)
Mutual labels:  static-analysis, cppcheck
Clangkit
ClangKit provides an Objective-C frontend to LibClang. Source tokenization, diagnostics and fix-its are actually implemented.
Stars: ✭ 330 (-95.43%)
Mutual labels:  static-analysis, clang
Cmake Templates
Some CMake Templates (examples). Qt, Boost, OpenCV, C++11, etc 一些栗子
Stars: ✭ 368 (-94.9%)
Mutual labels:  cmake, boost
Cgold
🐋 The Hitchhiker’s Guide to the CMake
Stars: ✭ 428 (-94.07%)
Mutual labels:  cmake, tutorial

CMake Examples

Introduction

CMake is a cross-platform open-source meta-build system which can build, test and package software. It can be used to support multiple native build environments including make, Apple’s xcode and Microsoft Visual Studio.

This repository includes some example modern CMake configurations which I have picked up when exploring it’s usage for various projects. The examples are laid out in a tutorial like format. The first examples are very basic and slowly increase in complexity drawing on previous examples to show more complex use cases.

These examples have been tested on Ubuntu 16.04 but should work under any Linux system that supports CMake v3.5+.

This branch works with the CMake version 3.5 onwards.

Build Status

Requirements

The basic requirements for most examples are:

  • CMake v3.5+

  • A c++ compiler (defaults to gcc)

  • make

Installation on Ubuntu

The easiest way to install the above on Ubuntu is as follows

$ sudo apt-get install build-essential
$ sudo apt-get install cmake

Some specific examples may require other tools including:

  • boost

    $ sudo apt-get install libboost-all-dev
  • protobuf

    $ sudo apt-get install libprotobuf-dev
    $ sudo apt-get install protobuf-compiler
  • cppcheck

    $ sudo apt-get install cppcheck
  • clang

    $ sudo apt-get install clang-3.6
  • ninja

    $ sudo apt-get install ninja-build
  • conan

    $ sudo apt-get install python3 python3-pip
    $ sudo pip3 install conan

Docker

Docker containers with all requirements and various versions of CMake are generated to help make testing the examples easier. These are available from the docker hub repository matrim/cmake-examples.

To build the full set of cmake-examples test cases you can run:

docker run -it matrim/cmake-examples:3.5.1
cd ~
git clone https://github.com/ttroy50/cmake-examples.git code
cd code
./test.sh

For more details on build and running the docker containers dockerfiles.

Other Links

There are many CMake tutorials and examples online. The list below includes links to some of these which I have found helpful in my CMake journey.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].