11# A Modern C/CPP Library Build System
22
3- This project is a C/C++ library built using Conan 2.0 , featuring modern C and C++ standard support and module
3+ This project is a C/C++ library built using Conan 2, featuring modern C and C++ standard support and module
44capabilities.
55
66## Badges
@@ -24,7 +24,7 @@ capabilities.
2424- ** Module Support** : Optionally activated, when C++ standard ≥ 23
2525- ** Component Structure** :
2626 - pairwise header and source assumption
27- - strict suffix constraint , (.h, .c) for C part, and (.hpp, .cpp) for C++ part
27+ - suffix distinguishment , (.h, .c) for C part, and (.hpp, .cpp) for C++ part
2828 - documenting system uses .dox for pure docstring, .cxx for examples codes
2929
3030## Features
@@ -53,6 +53,7 @@ capabilities.
5353- Graphviz
5454- sphinx
5555- sphinx-intl
56+ - sphinx-rtd-theme
5657
5758## Test Requirements
5859
@@ -62,26 +63,48 @@ capabilities.
6263
6364### 1. Build then test your library
6465
66+ inplace build and test
67+
6568``` bash
6669conan create . -s build_type=Debug --build=missing
6770```
6871
72+ cross-build to host device (assume toolchain and profile are ready):
73+
74+ ``` bash
75+ conan create . -pr:b=default -pr:h=arm_profile -s build_type=Debug --build=missing -tf=" "
76+ ```
77+
6978### 2. Build documentations
7079
7180``` bash
7281python ./docs/build.py
7382```
7483
75- ### 3. Add requirements
84+ ### 3. One-lined build automation
85+
86+ Unix-like platforms (Linux, MacOS):
7687
77- Add your desired library in * conandata.yml* where dependency graph is computed through, then modify the
78- ** dependencies** field in * metadata.json* , to link the targets in the proper way (no need modification
79- on * CMakeLists.txt* ).
88+ ``` bash
89+ bash ./build
90+ ```
91+
92+ Windows:
93+
94+ ``` powershell
95+ Get-Content "build" | Invoke-Expression
96+ ```
97+
98+ ### 4. Add requirements
99+
100+ Add your required libraries in * conandata.yml* where dependency graph is automatically computed from, then
101+ modify the ** dependencies** field in * metadata.json* to config proper package names and associated targets to
102+ link (no need modification on * CMakeLists.txt* ).
80103
81104Requirements for your project can be the package archived on [ Conan Center] ( https://conan.io/center ) , or user
82- built ones. If the later, more detailed configuration is in discussion .
105+ built ones. If the later one, at least you need a locale Conan server for managing your libraries .
83106
84- ## Project Structure
107+ ## All-in-one Project Structure
85108
86109```
87110project-root/
@@ -116,12 +139,12 @@ project-root/
116139 │ └── *.cpp # Scripts for stress testing
117140 ├── unit/
118141 │ └── *.cpp # Scripts for unit testing
119- ├── main.cpp # No testing validation program
142+ ├── main.cpp # Validation program for package
120143 ├── conanfile.py # Conan recipe for test_package
121144 └── CMakeLists.txt # CMake build workflow for test_package
122145```
123146
124- ## Module Generation
147+ ## Module Generation (experimental)
125148
126149When ` generate_modules_inplace ` is enabled in ` metadata.json ` :
127150
@@ -136,13 +159,18 @@ migration to fit the future C++ standard.
136159
137160## Compiler Support Matrix
138161
139- | Feature | MSVC | Clang | GCC |
140- | ------------------| ------| -------| -----|
141- | C++ Modules | ✓ | ✓ | ✓ |
142- | C Compatibility | ✓ | ✓ | ✓ |
143- | Automatic Export | ✓ | ✓ | ✓ |
162+ | Feature | MSVC | Clang | GCC | Apple-Clang |
163+ | ------------------| ------| -------| -----| -------------|
164+ | C++ Modules | ✓ | ✓ | ✓ | ✓ |
165+ | C Compatibility | ✓ | ✓ | ✓ | ✓ |
166+ | Automatic Export | ✓ | ✓ | ✓ | ✓ |
167+
168+ ## Platforms Support
169+
170+ - ** Desktop** : Windows, Linux, MacOS
171+ - ** Mobile** : arm-linux, risc-v
144172
145- ## To do things
173+ ## To Do Things
146174
147175Possible frame design/validation on Apple Clang compiler (raised from dlib requirement).
148176
0 commit comments