Updated single-header based on last cs and also docs

This commit is contained in:
Edward R. Gonzalez 2023-08-28 23:52:44 -04:00
parent 0197afd543
commit a4d9a63d71
2 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,4 @@
# Singleheader # Singleheader
`gen.singleheader.cpp` with its own `meson.build` generates the library as a single header `gen.hpp`. Creates a single header file version of the library using `gen.singleheader.cpp`.
Following the same convention seen in the gb, stb, and zpl libraries. Follows the same convention seen in the gb, stb, and zpl libraries.
( Currently WIP )

View File

@ -48,8 +48,6 @@ global bool generate_builder = true;
global bool generate_editor = true; global bool generate_editor = true;
global bool generate_scanner = true; global bool generate_scanner = true;
constexpr bool DontSkipInitialDirectives = false;
int gen_main() int gen_main()
{ {
#define project_dir "../project/" #define project_dir "../project/"
@ -57,7 +55,7 @@ int gen_main()
Code push_ignores = scan_file( project_dir "helpers/push_ignores.inline.hpp" ); Code push_ignores = scan_file( project_dir "helpers/push_ignores.inline.hpp" );
Code pop_ignores = scan_file( project_dir "helpers/pop_ignores.inline.hpp" ); Code pop_ignores = scan_file( project_dir "helpers/pop_ignores.inline.hpp" );
Code single_header_start = scan_file( "components/header_start.hpp", DontSkipInitialDirectives ); Code single_header_start = scan_file( "components/header_start.hpp" );
Builder Builder
header = Builder::open( "gen/gen.hpp" ); header = Builder::open( "gen/gen.hpp" );
@ -71,7 +69,7 @@ int gen_main()
if ( generate_gen_dep ) if ( generate_gen_dep )
{ {
Code header_start = scan_file( project_dir "dependencies/header_start.hpp", DontSkipInitialDirectives ); Code header_start = scan_file( project_dir "dependencies/header_start.hpp" );
Code macros = scan_file( project_dir "dependencies/macros.hpp" ); Code macros = scan_file( project_dir "dependencies/macros.hpp" );
Code basic_types = scan_file( project_dir "dependencies/basic_types.hpp" ); Code basic_types = scan_file( project_dir "dependencies/basic_types.hpp" );
Code debug = scan_file( project_dir "dependencies/debug.hpp" ); Code debug = scan_file( project_dir "dependencies/debug.hpp" );