You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake-init is a copy and paste template, that provides the following features:
12
-
* Cross Platform
13
-
* Windows
14
-
* Linux
15
-
* Mac
16
-
* Libraries, Applications, Testing template
17
-
* Documentation template
18
-
* Installation, Packaging template
19
-
* CMake find script template for defined libraries
20
11
21
-
The files of cmake-init are an instantiation of the templates containing:
22
-
* Example app
23
-
* Example lib
24
-
* Example test
25
-
* Example documentation
26
-
* Example package
12
+
*cmake-init* is a sophisticated copy & paste template for modern C and C++ projects.
13
+
The main goals include support of all use cases around software development (programming, testing, Q&A, deployment, documentation) while being modular, flexible, and idomatic. *cmake-init* is therefore a collection of cmake best-practices.
27
14
15
+
The main target platforms are typical desktop, laptop, and server platforms. Currently supported are:
28
16
29
-
## Design Decisions
17
+
* Windows
18
+
* macOS
19
+
* GNU/Linux
30
20
31
-
ToDo: revisit!
21
+
The cmake-init template assumes you want to setup a project using
22
+
* CMake (3.0 or above)
23
+
* C/C++ compiler
32
24
33
-
#### Console vs. Windows App (Windows only)
34
25
35
-
decisions:
36
-
* we do not use the msvc subsystem linker flag
37
-
* we do not use the add_executable win32 property
38
-
* instead the ```set_target_properties``` with the ```WIN32_EXECUTABLE``` flag on target executable is used
39
-
* we use the same subsystem for all configurations of a single target (no switching between, e.g., debug and release)
26
+
# Resources
40
27
41
-
rationale:
42
-
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
49
+
# Adaption Guide
45
50
51
+
# Non-Goals
46
52
53
+
In order to be usable in a deterministic, idiomatic fashion, we avoid the following approaches and features:
47
54
48
-
ToDo: Add missing content, bring into markdown form
55
+
## Super-Build
49
56
57
+
Due to the current semantics of targets and CMake internals, combining multiple
58
+
cmake-init projects into one super-build project is not officially supported.
59
+
There are limited and restricting workarounds.
60
+
Actual solution: treat each project separately and use explicit dependency management.
50
61
51
-
Scenarios covered in cmake-init:
62
+
## High Abstraction
52
63
64
+
We use low abstractions to not build a language upon CMake a user has to learn.
53
65
54
-
1) Development
66
+
## File Glob
55
67
56
-
The project is contained in a source directory for active development.
68
+
Explicit source specification prevents erroneous cases when adding and removing
69
+
sources from the project tree.
57
70
58
-
binaries: ./build
59
-
rpath: absolute paths to all dependencies
60
-
datapath: ..
71
+
# Module Documentation
61
72
73
+
## Core Modules
62
74
63
-
2) Installation (default)
75
+
### CMake Initialization
64
76
65
-
The project is installed in a self-contained directory, ready for being moved or copied to another location or computer.
0 commit comments