From 4a87a42db0d0a788207c000defa836dbe9440bbc Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 24 Jul 2023 18:56:15 -0400 Subject: [PATCH] Fixes + more setup, added more directories to clean script. --- project/gen.bootstrap.cpp | 2 +- project/meson.build | 2 +- scripts/bootstrap.ci.ps1 | 2 +- scripts/clean.ps1 | 24 ++++++++++++++++-------- singleheader/gen.singleheader.cpp | 11 +++++++++++ singleheader/meson.build | 2 +- 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/project/gen.bootstrap.cpp b/project/gen.bootstrap.cpp index aa2de46..fd912eb 100644 --- a/project/gen.bootstrap.cpp +++ b/project/gen.bootstrap.cpp @@ -5,7 +5,7 @@ using namespace gen; -void gen_main() +int gen_main() { diff --git a/project/meson.build b/project/meson.build index 3f3f18f..a9b2d09 100644 --- a/project/meson.build +++ b/project/meson.build @@ -7,7 +7,7 @@ includes = include_directories( sources = [ 'gen.bootstrap.cpp' ] -if get_option('buildtype').sartswith('debug') +if get_option('buildtype').startswith('debug') add_project_arguments('-DBuild_Debug', language : ['c', 'cpp']) diff --git a/scripts/bootstrap.ci.ps1 b/scripts/bootstrap.ci.ps1 index 35cc82a..5f586d3 100644 --- a/scripts/bootstrap.ci.ps1 +++ b/scripts/bootstrap.ci.ps1 @@ -15,7 +15,7 @@ foreach ( $arg in $args ) $path_root = git rev-parse --show-toplevel $path_project = Join-Path $path_root project -$path_project_build = Join-Path $path_bootstrap build +$path_project_build = Join-Path $path_project build write-host "`n`nBuilding gencpp bootstrap`n" diff --git a/scripts/clean.ps1 b/scripts/clean.ps1 index daec07f..52d7ed4 100644 --- a/scripts/clean.ps1 +++ b/scripts/clean.ps1 @@ -1,13 +1,21 @@ -$path_root = git rev-parse --show-toplevel -$path_build = Join-Path $path_root build -$path_test = Join-Path $path_root test -$path_gen = Join-Path $path_test gen -$path_test_build = Join-Path $path_test build -$path_gen_build = Join-Path $path_gen build +$path_root = git rev-parse --show-toplevel +$path_project = Join-Path $path_root project +$path_singleheader = Join-Path $path_root singleheader +$path_test = Join-Path $path_root test +$path_gen = Join-Path $path_test gen +$path_gen_build = Join-Path $path_gen build +$path_test_build = Join-Path $path_test build +$path_project_build = Join-Path $path_project build +$path_singleheader_build = Join-Path $path_singleheader build -if ( Test-Path $path_build ) +if ( Test-Path $path_project_build) { - Remove-Item $path_build -Recurse + Remove-Item $path_project_build -Recurse +} + +if ( Test-Path $path_singleheader_build) +{ + Remove-Item $path_singleheader_build -Recurse } if ( Test-Path $path_test_build ) diff --git a/singleheader/gen.singleheader.cpp b/singleheader/gen.singleheader.cpp index e69de29..da4af22 100644 --- a/singleheader/gen.singleheader.cpp +++ b/singleheader/gen.singleheader.cpp @@ -0,0 +1,11 @@ +#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS +#define GEN_ENFORCE_STRONG_CODE_TYPES +#define GEN_EXPOSE_BACKEND +#include "gen.cpp" + +using namespace gen; + +int gen_main() +{ + return 0; +} \ No newline at end of file diff --git a/singleheader/meson.build b/singleheader/meson.build index ee7afbf..14e71fc 100644 --- a/singleheader/meson.build +++ b/singleheader/meson.build @@ -7,7 +7,7 @@ includes = include_directories( sources = [ 'gen.singleheader.cpp' ] -if get_option('buildtype').sartswith('debug') +if get_option('buildtype').startswith('debug') add_project_arguments('-DBuild_Debug', language : ['c', 'cpp'])