test/README.md

61 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Simple C++ CMake Project
这是一个简单的 C++17 项目,使用 CMake 构建系统。
## 项目结构
```
├── CMakeLists.txt # CMake 配置文件
├── README.md # 项目说明文档
├── include/
│ └── app.hpp # 应用程序头文件
├── src/
│ ├── app.cpp # 应用程序实现
│ └── main.cpp # 主程序入口
└── tests/
└── basic_test.cpp # 基本测试
```
## 编译步骤
### 1. 创建构建目录
```bash
mkdir build
cd build
```
### 2. 配置 CMake
```bash
cmake ..
```
### 3. 编译项目
```bash
cmake --build .
```
或者使用平台特定的编译命令:
```bash
make # Linux/macOS
```
### 4. 运行主程序
编译完成后,可执行文件位于 `build/bin/` 目录下:
```bash
# 运行主程序
./build/bin/main_app
# 运行测试
./build/bin/basic_test
```
## 功能说明
- **main_app**: 主程序,演示基本的应用程序功能
- **basic_test**: 基本测试程序,验证核心功能
## 依赖要求
- CMake 3.10 或更高版本
- 支持 C++17 的编译器(如 GCC 7+, Clang 5+, MSVC 2017+