Got it to compile (without Incremental, parsing, editor, scanner)

This commit is contained in:
2023-05-07 15:03:24 -04:00
parent 74c5736f59
commit 00b4220333
6 changed files with 203 additions and 253 deletions

View File

@ -7,7 +7,7 @@ foreach ( $arg in $args )
{
$test = $true
}
else
else
{
$type = $arg
}
@ -19,47 +19,6 @@ $path_build = Join-Path $path_root build
$path_scripts = Join-Path $path_root scripts
if ($false)
{
#region Regular Build
write-host "Building project`n"
if ( -not( Test-Path $path_build ) )
{
$args_meson = @()
$args_meson += "setup"
$args_meson += $path_build
# Start-Process meson $args_meson -NoNewWindow -Wait -WorkingDirectory $path_scripts
Push-Location $path_scripts
Invoke-Expression "& meson $args_meson"
Pop-Location
}
if ( $type )
{
$args_meson = @()
$args_meson += "configure"
$args_meson += $path_build
$args_meson += "--buildtype $($type)"
# Start-Process meson $args_meson -NoNewWindow -Wait -WorkingDirectory $path_scripts
Push-Location $path_scripts
Invoke-Expression "& meson $args_meson"
Pop-Location
}
$args_ninja = @()
$args_ninja += "-C"
$args_ninja += $path_build
Push-Location $path_root
ninja $args_ninja
Pop-Location
#endregion Regular Build
}
# if ( $test -eq $true )
# {
#region Test Build
@ -81,7 +40,7 @@ Pop-Location
& meson $args_meson
Pop-Location
}
$args_ninja = @()
$args_ninja += "-C"
$args_ninja += $path_gen_build
@ -98,29 +57,29 @@ Pop-Location
# Build the program depending on generated files.
if ( -not( Test-Path $path_test_build ) )
{
$args_meson = @()
$args_meson += "setup"
$args_meson += $path_test_build
# if ( -not( Test-Path $path_test_build ) )
# {
# $args_meson = @()
# $args_meson += "setup"
# $args_meson += $path_test_build
Push-Location $path_test
& meson $args_meson
Pop-Location
}
# Push-Location $path_test
# & meson $args_meson
# Pop-Location
# }
$args_ninja = @()
$args_ninja += "-C"
$args_ninja += $path_test_build
# $args_ninja = @()
# $args_ninja += "-C"
# $args_ninja += $path_test_build
Push-Location $path_root
ninja $args_ninja
Pop-Location
# Push-Location $path_root
# ninja $args_ninja
# Pop-Location
$testcpp = Join-Path $path_test_build testcpp.exe
# $testcpp = Join-Path $path_test_build testcpp.exe
Push-Location $path_test
& $testcpp
Pop-Location
# Push-Location $path_test
# & $testcpp
# Pop-Location
# endregion Test Build
# }

View File

@ -1,19 +0,0 @@
project( 'refactor', 'c', 'cpp', default_options : ['buildtype=release'] )
# add_global_arguments('-E', language : 'cpp')
includes = include_directories(
[ '../project'
, '../thirdparty'
])
get_sources = files('./get_sources.ps1')
sources = files(run_command('powershell', get_sources, check: true).stdout().strip().split('\n'))
if get_option('buildtype').startswith('debug')
add_project_arguments('-DBuild_Debug', language : ['c', 'cpp'])
endif
executable( 'refactor', sources, include_directories : includes )