MarkSchofield / WindowsCMake

CMake-scripts for Windows-specific build tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMake Tooling for Windows Builds

'WindowsCMake' contains CMake-scripts for Windows-specific build tasks, like unpacking NuGet files or generating Cpp/WinRT projections.

Linting

WindowsCMake uses cmakelang for linting the CMake files in the codebase. The .cmake-format.yaml file describes the formatting style for the codebase. To run the linting tools:

  1. Install cmakelang following the installation instuctions. Note: Since WindowsCMake uses a .yaml file for configuration, make sure to install the cmakelang[YAML] package.

  2. Run ./analyze.ps1

The WindowsCMake CI GitHub Workflow enforces the linting rules during PR and CI.

Testing

WindowsCMake uses Pester for testing the CMake files in the codebase. The tests are written for PowerShell Core and checked into the Tests folder. To run the tests:

  1. Launch a PowerShell Core prompt.

    pwsh
    
  2. Make sure that you have Pester installed. This only needs to be done once.

    Install-Module Pester
  3. Import the Pester module into the PowerShell Core session:

    Import-Module Pester
  4. Discover and run all tests:

    Invoke-Pester

The WindowsCMake CI GitHub Workflow requires all tests to pass during PR and CI.

About

CMake-scripts for Windows-specific build tasks.

License:MIT License


Languages

Language:CMake 63.7%Language:PowerShell 22.9%Language:C++ 10.2%Language:C 3.2%