Skip to content

This repo can be used for OpenFOAM project to generate CMakeLists.txt, then compile_commands.json can be generated.

Notifications You must be signed in to change notification settings

zhyang-dev/of_cmake_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

of_cmake_config

中文 | English

Introduction

This project is used to generate CMakeLists.txt for OpenFOAM projects.

Installation Guide

  1. Activate the required OpenFOAM environment (otherwise the installation will fail).
  2. Obtain the project source code: git clone --depth=1 https://github.com/zhyang-dev/of_cmake_config.git
  3. Install: cd of_cmake_config && ./install

Usage Instructions

  1. Activate the OpenFOAM environment.
  2. 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.
Video Demo

About

This repo can be used for OpenFOAM project to generate CMakeLists.txt, then compile_commands.json can be generated.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published