of_cmake_config/README.md

25 lines
916 B
Markdown
Raw Permalink Normal View History

2022-04-11 06:11:23 +00:00
# of_cmake_config
2024-09-10 05:41:30 +00:00
[中文](./README.zh_CN.md) | [English](./README.md)
2022-04-11 06:11:23 +00:00
#### Introduction
This project is used to generate `CMakeLists.txt` for OpenFOAM projects.
2022-04-11 06:11:23 +00:00
#### Installation Guide
0. Activate the required OpenFOAM environment (otherwise the installation will fail).
2024-09-11 14:29:37 +00:00
1. Obtain the project source code: `git clone --depth=1 https://github.com/zhyang-dev/of_cmake_config.git`
2024-09-10 05:41:30 +00:00
2. Install: `cd of_cmake_config && ./install`
2022-04-11 06:11:23 +00:00
#### Usage Instructions
2022-04-11 06:11:23 +00:00
0. Activate the OpenFOAM environment.
1. In the project's root directory:
- Run `ofCmakeConfig` to generate `CMakeLists.txt`.
- Or run `occ`, which will execute `ofCmakeConfig` and call `cmake -B build`, eventually generating `compile_commands.json` in the build directory.
2022-08-28 16:10:53 +00:00
#### Testing Environment
- `vscode` + `clangd`
- `vim` + `coc-clangd`
The following demonstrates the second scenario based on the icoFoam case.
2024-09-11 14:29:37 +00:00
![Video Demo](demo/occ_demo.gif)