Dragonhill.CMakeFileWatcher 0.1.0

.NET 6.0
dotnet tool install --global Dragonhill.CMakeFileWatcher --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Dragonhill.CMakeFileWatcher --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Dragonhill.CMakeFileWatcher&version=0.1.0
nuke :add-package Dragonhill.CMakeFileWatcher --version 0.1.0

CMakeFileWatcher

Installation

The CMakeFileWatcher is indented to be used with the dotnet tool command.

Steps to install it as local tool in a project:

  • If not present create a tool manifest (execute at project root): dotnet new tool-manifest
  • Install the tool: dotnet tool install --local Dragonhill.CMakeFileWatcher
  • Run the tool: dotnet tool cmake-file-watcher

Configuration

Add a .config/cmake-file-watcher-config.yaml file to your project (the .config folder has to be in a common root directory for all watched paths).

Example

Config file: .config/cmakeFileWatcherConfig.yaml
roots:
  - path: subdirectory-a
    generatedFilePath: subdirectory-a/list.cmake
    patternGroups:
      - extensions: [cpp, h]
        listName: dep_list
      - extensions: [po]
        listName: translation_list
File tree
root/
├─ demo/
│  ├─ module/
│  │  ├─ module.cpp
│  │  ├─ module.h
│  ├─ translation/
│  │  ├─ english.po
│  ├─ main.cpp
│  ├─ readme.txt
├─ .config
│  ├─ cmakeFileWatcherConfig.yaml
Resulting file: demo/list.cmake
list(APPEND dep_list
    "main.cpp"
    "module/module.cpp"
    "module/module.h"
)

list(APPEND translation_list
    "translation/english.po"
)

Usage

Execute the tool (tool name is cmake-file-watcher) in the directory where the .config folder is.

Creating a release of the tool itself

With a release git tag available

dotnet msbuild -t:ReleasePackGitTag

Manual version specification

dotnet msbuild /p:Version=1.0.0-pre1 -t:pack
Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.1.0 106 3/20/2022