|
1 |
| -# CMake Project template |
2 |
| - |
3 |
| -This repository is a template for CMake C++ Projects. |
4 |
| - |
5 |
| -## Supported Compiilers |
6 |
| - |
7 |
| - - gcc |
8 |
| - - clang |
9 |
| - |
10 |
| -## Project structure |
11 |
| - |
12 |
| -### Directory src |
13 |
| -Use this directory for all source files of the project. |
14 |
| - |
15 |
| -### Directory libs |
16 |
| -Place libraries here. This Directory is added to the include path. |
17 |
| - |
18 |
| -## Scripts |
19 |
| - |
20 |
| -### check_format.sh |
21 |
| -This script checks all ```*.cpp``` and ```*.hpp``` files for conformity with the file ```.clang-format```. |
22 |
| - |
23 |
| -### format.sh |
24 |
| -This script formats all ```*.cpp``` and ```*.hpp``` files in the src directory with clang format. |
25 |
| -The files are changed by it! |
26 |
| - |
27 |
| -## Options |
28 |
| - |
29 |
| -### Target |
30 |
| -The name of the executable that is generated. |
31 |
| - |
32 |
| -### STANDARD |
33 |
| -The minimum required C++ standard: 98, 03, 11, 14, 17, 20 |
34 |
| - |
35 |
| -### ARCHITECTURE |
36 |
| -The CPU architecture for which the code is generated. |
37 |
| -It is only relevant if the option ```OPTIMIZE_FOR_ARCHITECTURE``` is enabled. |
38 |
| - |
39 |
| -```native``` should be the best choice in most cases. |
40 |
| - |
41 |
| -### BUILD_DOC |
42 |
| -Enables the automatic generation of a doxygen documentation. |
43 |
| -Doxygen must be installed on the system and a ```Doxyfile.in``` file must be provided. |
44 |
| -An additional CMake target is created. |
45 |
| - |
46 |
| -### COMPILER_WARNINGS |
47 |
| -Enable/Disable compiler warnings. |
48 |
| - |
49 |
| -### ENABLE_MULTITHREADING |
50 |
| -Link the default multithreading library for the current target system. |
51 |
| -Prefers ```pthread``` if available. |
52 |
| - |
53 |
| -### MAKE_32_BIT_BINARY |
54 |
| -Forces the compiler to generate a 32 bit application by setting the ```-m32``` flag. |
55 |
| - |
56 |
| -### OPENMP |
57 |
| -Enables the support for openmp. |
58 |
| - |
59 |
| -### OPTIMIZE_DEBUG |
60 |
| -Enables Optimization ```-O3``` also in debug configuration. |
61 |
| -Should only be enabled if the resulting binary is too slow. |
62 |
| - |
63 |
| -### CLANG_FORMAT |
64 |
| -Enable automatic formatting via clang-format. |
65 |
| -An additional CMake target is created. |
66 |
| - |
67 |
| -### CLANG_TIDY |
68 |
| -Enable static code checks with clang tidy. |
69 |
| -An additional CMake target is created. |
70 |
| - |
71 |
| -Not usable in this version due to contradictory warnings. |
72 |
| - |
73 |
| -### LTO_ENABLED |
74 |
| -Enable interprocedural and link time optimizations. |
75 |
| - |
76 |
| -### COMPILER_EXTENSIONS |
77 |
| -Enable compiler specific C++ extensions. |
78 |
| -Should be disabled for reasons of portability. |
79 |
| - |
80 |
| - |
| 1 | +# Write SHM |
| 2 | + |
| 3 | +Writes data from stdin to a named shared memory. |
| 4 | + |
| 5 | +## Build |
| 6 | +``` |
| 7 | +git submodule init |
| 8 | +git submodule update |
| 9 | +mkdir build |
| 10 | +cd build |
| 11 | +cmake .. -DCMAKE_CXX_COMPILER=$(which clang++) -DCMAKE_BUILD_TYPE=Release -DCLANG_FORMAT=OFF -COMPILER_WARNINGS=OFF |
| 12 | +cmake --build . |
| 13 | +``` |
| 14 | + |
| 15 | +As an alternative to the ```git submodule``` commands, the ```--recursive``` option can be used with ```git clone```. |
| 16 | + |
| 17 | +## Use |
| 18 | +``` |
| 19 | +write_shm [OPTION...] |
| 20 | +
|
| 21 | + -n, --name arg shared memory name (mandatory) |
| 22 | + -r, --repeat repeat input if input size is smaller than shared memory |
| 23 | + -h, --help print usage |
| 24 | +``` |
| 25 | + |
| 26 | +## Libraries |
| 27 | +This application uses the following libraries: |
| 28 | +- cxxopts by jarro2783 (https://github.com/jarro2783/cxxopts) |
0 commit comments