Simpilication of build script, added initial support for tests

This commit is contained in:
2023-08-20 12:31:24 -04:00
parent 37d9782cf2
commit a6bf60a51e
17 changed files with 574 additions and 790 deletions

View File

@ -2,8 +2,8 @@
#define GEN_ENFORCE_STRONG_CODE_TYPES
#define GEN_EXPOSE_BACKEND
#define GEN_BENCHMARK
#include "gen/gen.hpp"
#include "gen/gen.builder.hpp"
#include "gen.hpp"
#include "gen.builder.hpp"
using namespace gen;
Code gen_SOA( CodeStruct struct_def, s32 num_entries = 0 )

View File

@ -1,27 +0,0 @@
project( 'test', 'c', 'cpp', default_options : ['buildtype=debug'] )
# 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'))
sources = [ '../test.cpp' ]
if get_option('buildtype').startswith('debug')
add_project_arguments('-DBuild_Debug', language : ['c', 'cpp'])
# add_project_arguments('-E', language : ['c', 'cpp'])
endif
# add_project_arguments('-E', language : ['c', 'cpp'])
# add_global_arguments( '-E', language : ['cpp'])
add_project_arguments('-DGEN_TIME', language : ['c', 'cpp'])
executable( 'gencpp', sources, include_directories : includes )

View File

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

View File

@ -4,8 +4,8 @@
#define GEN_ENFORCE_STRONG_CODE_TYPES
#define GEN_EXPOSE_BACKEND
#define GEN_BENCHMARK
#include "gen/gen.hpp"
#include "gen/gen.builder.hpp"
#include "gen.hpp"
#include "gen.builder.hpp"
void check_sanity()
{

View File

@ -2,8 +2,8 @@
#define GEN_ENFORCE_STRONG_CODE_TYPES
#define GEN_EXPOSE_BACKEND
#define GEN_BENCHMARK
#include "gen/gen.cpp"
#include "gen/gen.builder.cpp"
#include "gen.cpp"
#include "gen.builder.cpp"
#include "sanity.cpp"
#include "SOA.cpp"
#include "test.singleheader_ast.cpp"

View File

@ -2,9 +2,9 @@
#define GEN_ENFORCE_STRONG_CODE_TYPES
#define GEN_EXPOSE_BACKEND
#define GEN_BENCHMARK
#include "gen/gen.hpp"
#include "gen/gen.builder.hpp"
#include "gen/gen.scanner.hpp"
#include "gen.hpp"
#include "gen.builder.hpp"
#include "gen.scanner.hpp"
using namespace gen;
void check_singleheader_ast()