https://github.com/zhyang-dev/of_cmake_config
This repo can be used for OpenFOAM project to generate CMakeLists.txt, then compile_commands.json can be generated.
https://github.com/zhyang-dev/of_cmake_config
openfoam python shell
Last synced: 5 months ago
JSON representation
This repo can be used for OpenFOAM project to generate CMakeLists.txt, then compile_commands.json can be generated.
- Host: GitHub
- URL: https://github.com/zhyang-dev/of_cmake_config
- Owner: zhyang-dev
- Created: 2024-09-10T05:37:52.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T01:35:49.000Z (almost 2 years ago)
- Last Synced: 2025-03-23T05:11:17.252Z (over 1 year ago)
- Topics: openfoam, python, shell
- Language: Python
- Homepage:
- Size: 3.39 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# of_cmake_config
[中文](./README.zh_CN.md) | [English](./README.md)
#### Introduction
This project is used to generate `CMakeLists.txt` for OpenFOAM projects.
#### Installation Guide
0. Activate the required OpenFOAM environment (otherwise the installation will fail).
1. Obtain the project source code: `git clone --depth=1 https://github.com/zhyang-dev/of_cmake_config.git`
2. Install: `cd of_cmake_config && ./install`
#### Usage Instructions
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.
#### Testing Environment
- `vscode` + `clangd`
- `vim` + `coc-clangd`
The following demonstrates the second scenario based on the icoFoam case.
