C++ CMake Project Template
cmake-init is a copy and paste template, that provides the following features:
- Cross Platform
- Libraries, Applications, Testing template
- Documentation template
- Installation, Packaging template
- CMake find script template for defined libraries
The files of cmake-init are an instantiation of the templates containing:
- Example app
- Example lib
- Example test
- Example documentation
- Example package
|Travis-CI||Ubuntu 14.04||GCC 4.8, Clang 3.5|
||MSVC 2013 Update 5
MSVC 2015 Update 1
|Jenkins||OS X 10.10||AppleClang 6.0|
Please note that our OS X build node is currently broken (physically). However, cmake-init is supported and maintained for OS X as well.
Console vs. Windows App (Windows only)
- we do not use the msvc subsystem linker flag
- we do not use the add_executable win32 property
- instead the
WIN32_EXECUTABLEflag on target executable is used
- we use the same subsystem for all configurations of a single target (no switching between, e.g., debug and release)
rationale: typically, only released 'feature' applications are required to decide on their subsystem, and in the case of 'gui-heavy' applications the windows subsystem is preferred (since the std output is probably piped into widgets, logfiles, or even discard).
furthermore, console output is usually more relevant for development/debugging purposes, already using console or IDE with appropriate console output handling
ToDo: Add missing content, bring into markdown form
Scenarios covered in cmake-init:
The project is contained in a source directory for active development.
binaries: ./build rpath: absolute paths to all dependencies datapath: ..
- Installation (default)
The project is installed in a self-contained directory, ready for being moved or copied to another location or computer.
binaries: ./bin rpath: $ORIGIN/../lib datapath: ..
- Installation (unix system install)
The project is installed globally on a system.
binaries: /usr/[local/]bin rpath: empty datapath: /usr/[local/]share/