From ca8bb4ee3cc9afdeca4b49c5ef758bad7cce2c72 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Thu, 15 Jun 2023 12:22:52 -0600 Subject: icd: Move handwritten code into .cpp file Takes the hand written portions of the mock_icd_generator.py and puts them in a .cpp file, then moves the code gen into function_declarations.h and function_definitions.h. This move makes it easier to maintain the C++ code that exists because it no longer lives in a python file. This commit does not make adding custom code easier, as it still is in the python file. The intent of this commit is to create a baseline that would allow such code to be put inside of C++ instead of python. Additionally, this commit removes egregious over engineering in the mock icd CMakeLists.txt. Things removed are macros that are only called once, foreach loops over single items, and replacing variables that had no solid reason to be a variable. --- scripts/generate_source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/generate_source.py') diff --git a/scripts/generate_source.py b/scripts/generate_source.py index 5fb7941e..abd8a754 100755 --- a/scripts/generate_source.py +++ b/scripts/generate_source.py @@ -46,8 +46,8 @@ def main(argv): # output paths and the list of files in the path files_to_gen = {str(os.path.join('icd','generated')) : ['vk_typemap_helper.h', - 'mock_icd.h', - 'mock_icd.cpp'], + 'function_definitions.h', + 'function_declarations.h'], str(os.path.join('vulkaninfo','generated')): ['vulkaninfo.hpp']} #base directory for the source repository -- cgit v1.2.3