'WindowsCMake' contains CMake-scripts for Windows-specific build tasks, like unpacking NuGet files or generating Cpp/WinRT projections.
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:
-
Install
cmakelang
following the installation instuctions. Note: Since WindowsCMake uses a.yaml
file for configuration, make sure to install thecmakelang[YAML]
package. -
Run
./analyze.ps1
The WindowsCMake CI GitHub Workflow enforces the linting rules during PR and CI.
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:
-
Launch a PowerShell Core prompt.
pwsh
-
Make sure that you have Pester installed. This only needs to be done once.
Install-Module Pester
-
Import the Pester module into the PowerShell Core session:
Import-Module Pester
-
Discover and run all tests:
Invoke-Pester
The WindowsCMake CI GitHub Workflow requires all tests to pass during PR and CI.