cmake-init is a copy and paste template, that provides the following features:
- Cross Platform
- Windows
- Linux
- Mac
- 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
Service | System | Compiler | Status |
---|---|---|---|
Travis-CI | Ubuntu 14.04 | GCC 4.8, Clang 3.5 | |
Travis-CI | macOS | AppleClang 7.3 | |
AppVeyor | Windows | MSVC 2013 MSVC 2015 MSVC 2017 |
|
Jenkins |
Ubuntu 14.04 |
GCC 4.7 GCC 4.8 GCC 4.9 GCC 5.4 Clang 3.8 |
|
Jenkins |
Windows 10 |
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.
ToDo: revisit!
decisions:
- we do not use the msvc subsystem linker flag
- we do not use the add_executable win32 property
- instead the
set_target_properties
with theWIN32_EXECUTABLE
flag 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:
- Development
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/
windows setup qt if needed:
- add [qtroot]/bin to PATH
- create env variables QT_QPA_PLATFORM_PLUGIN_PATH QT_PLUGIN_PATH QML_IMPORT_PATH QML2_IMPORT_PATH https://github.com/pyqt/python-qt5/wiki/Qt-Environment-Variable-Reference#qt-qpa-platform-plugin-path
windows setup letxt: download https://miktex.org/download and then add C:\Program Files\MiKTeX 2.9\miktex\bin\x64 to PATH
windows setup geveci download https://graphviz.gitlab.io/_pages/Download/Download_windows.html and then add C:\Program Files (x86)\Graphviz2.38\bin to PATH