Setup testing and library for getting the parse api done.

This commit is contained in:
2023-07-08 14:11:41 -04:00
parent a0250d1109
commit b360cf3024
8 changed files with 358 additions and 198 deletions

View File

@ -49,7 +49,8 @@ $path_scripts = Join-Path $path_root scripts
& ninja $args_ninja
Pop-Location
if ($true) {
# Test NonParsed
if ($false) {
$gencpp = Join-Path $path_gen_build gencpp.exe
Push-location $path_gen
@ -74,6 +75,32 @@ $path_scripts = Join-Path $path_root scripts
Pop-Location
}
# Test Parsed
if ($true) {
$gencpp = Join-Path $path_gen_build gencpp_parsed.exe
Push-location $path_gen
Write-Host `nGenerating files -- using Parse API...
& $gencpp
Write-Host `nBeginning format...
$formatParams = @(
'-i' # In-place
'-style=file' # Search for a .clang-format file in the parent directory of the source file.
'-verbose'
)
$include = @('*.gen.hpp', '*.gen.cpp')
$exclude = $null
$targetFiles = @(Get-ChildItem -Recurse -Path $path_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName)
clang-format $formatParams $targetFiles
Write-Host "`nFormatting complete"
Pop-Location
}
# Build the program depending on generated files.
# if ( -not( Test-Path $path_test_build ) )k