Skip to content

Commit d3bbbc4

Browse files
authored
Enhance README formatting and section clarity
Updated README to enhance formatting and clarity, including adding icons for sections and improving consistency in prerequisites and commands.
1 parent 57df88d commit d3bbbc4

1 file changed

Lines changed: 55 additions & 19 deletions

File tree

README.md

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,31 @@
22

33
A collection of minimal, self-contained C++ examples demonstrating multiple ways to implement the Singleton design pattern. The repository includes modern, thread-safe techniques (Meyers Singleton) and legacy aproaches (Raw Pointers, Double-Checked Locking) for comparison.
44

5-
## Prerequisites
5+
## 🔍 Overview
6+
7+
## ⚙️ Prerequisites
68

79
Before building, ensure you have the following installed:
810

911
### Common Requirements (All Platforms)
1012

1113
* **CMake** (v3.20 or newer required for Presets)
1214

13-
### Windows - Visual Studio MSVC (Preset: windows-msvc)
15+
### 🖥️ Windows - Visual Studio MSVC (Preset: windows-msvc)
1416

1517
* **Visual Studio 2022**
16-
* **Workload Required:** Desktop development with C++
17-
* **Note:** The preset uses the Visual Studio 17 2022 generator.
18+
* **Workload Required: Desktop development with C++**
19+
* **Note: The preset uses the Visual Studio 17 2022 generator.**
1820

19-
### Windows - MinGW (Preset: windows-mingw)
21+
### 🖥️ Windows - MinGW (Preset: windows-mingw)
2022

2123
* **MinGW-w64 Toolchain**
22-
* **Make Tool: mingw32-make** (Included with most MinGW installers).
23-
* **Configuration:** The bin folder of your MinGW installation (e.g., C:\msys64\mingw64\bin) must be in your system PATH environment variable.
24-
25-
### Linux (Preset: linux-ninja)
24+
* **Make Tool: mingw32-make (Included with most MinGW installers).**
25+
* **Configuration: The bin folder of your MinGW installation (e.g., C:\msys64\mingw64\bin) must be in your system PATH environment variable.**
2626

27-
* **C++ Compiler:** GCC or Clang (supporting C++17)
27+
### 🐧 Linux (Preset: linux-ninja)
2828

29+
* **C++ Compiler: GCC or Clang (supporting C++17)**
2930
* **Generator: Ninja Build System**
3031

3132
Install Command (Ubuntu/Debian):
@@ -39,29 +40,45 @@ The commands below are executed from the **root of the repository**.
3940

4041
### 1. Configure Workspace (Run Once)
4142

43+
#### 🖥️ Windows (MSVC)
44+
4245
```bash
43-
# Windows (Visual Studio 2022 – MSVC)
4446
cmake --preset windows-msvc
45-
# Windows (MinGW – Debug)
47+
```
48+
49+
#### 🖥️ Windows (MinGW - Debug)
50+
51+
```bash
4652
cmake --preset windows-mingw-debug
47-
# Linux (Ninja - Debug)
53+
```
54+
55+
#### 🐧 Linux (Ninja - Debug)
56+
57+
```bash
4858
cmake --preset linux-ninja-debug
4959
```
5060

51-
### 2. Build Commands
61+
### Build All (Debug)
5262

53-
#### Build All (Debug)
63+
#### 🖥️ Windows (MSVC)
5464

5565
```bash
56-
# Windows (Visual Studio 2022 – MSVC)
5766
cmake --build --preset windows-msvc-debug
58-
# Windows (MinGW – Debug)
67+
```
68+
69+
#### 🖥️ Windows (MinGW - Debug)
70+
71+
```bash
5972
cmake --build --preset windows-mingw-debug
60-
# Linux (Ninja - Debug)
73+
```
74+
75+
#### 🐧 Linux (Ninja - Debug)
76+
77+
```bash
6178
cmake --build --preset linux-ninja-debug
6279
```
6380

64-
#### Build Specific Project
81+
### Build Specific Project
6582

6683
```bash
6784
cmake --build --preset <preset> --target <target_name>
@@ -71,3 +88,22 @@ Example:
7188
cmake --build --preset linux-ninja-debug --target singleton-meyers-example
7289

7390
```
91+
92+
## 🏃 Running Examples
93+
94+
### 🖥️ Windows (MSVC)
95+
```bash
96+
build/windows-msvc/singleton-meyers-example/Debug/singleton-meyers-example.exe
97+
```
98+
99+
### 🖥️ Windows (MinGW)
100+
```bash
101+
build/windows-mingw-debug/singleton-meyers-example/singleton-meyers-example.exe
102+
```
103+
104+
105+
### 🐧 Linux
106+
```bash
107+
./build/linux-ninja-debug/singleton-meyers-example/singleton-meyers-example
108+
```
109+

0 commit comments

Comments
 (0)