of_cmake_config
Introduction
This project is used to generate CMakeLists.txt for OpenFOAM projects.
Installation Guide
- Activate the required OpenFOAM environment (otherwise the installation will fail).
- Obtain the project source code:
git clone --depth=1 https://github.com/zhyang-dev/of_cmake_config.git - Install:
cd of_cmake_config && ./install
Usage Instructions
- Activate the OpenFOAM environment.
- In the project's root directory:
- Run
ofCmakeConfigto generateCMakeLists.txt. - Or run
occ, which will executeofCmakeConfigand callcmake -B build, eventually generatingcompile_commands.jsonin the build directory.
- Run
Testing Environment
vscode+clangdvim+coc-clangd
The following demonstrates the second scenario based on the icoFoam case.

Description
Languages
Python
79.5%
Shell
20.5%