diff --git a/aidge_core/export_utils/node_export.py b/aidge_core/export_utils/node_export.py index 9f54945de6b0a862b1e7f72d51c0dc7636b22551..5777814a0b10c49d0f75245bdc4e9681027bdfb8 100644 --- a/aidge_core/export_utils/node_export.py +++ b/aidge_core/export_utils/node_export.py @@ -362,11 +362,11 @@ class ExportNodeCpp(ExportNode): # List of includes to add example "include/toto.hpp" include_list: list = None # A list of path of kernels to copy in the export - # kernels are copied in the path at the same index within the kernels_path list. + # kernels are copied in str(export_folder / "include" / "kernels") # They are automatically added to the include list. kernels_to_copy: list = None # Path where all the kernels are stored in the export (prefixed by export_root) - kernels_path: list = None + kernels_path: str = "include/kernels" # Path of config folders config_path: str = "include/layers" # Config_folder_extension @@ -392,18 +392,16 @@ class ExportNodeCpp(ExportNode): raise ValueError("include_list have not been defined") if self.kernels_to_copy is None: raise ValueError("kernels_to_copy have not been defined") - if self.kernels_path is None: - raise ValueError("kernels_path have not been defined") kernel_include_list = [] - for i, kernel in enumerate(self.kernels_to_copy): + for kernel in self.kernels_to_copy: kernel_path = Path(kernel) code_generation.copy_file( kernel_path, - str(export_folder / self.kernels_path[i]) + str(export_folder / self.kernels_path) ) kernel_include_list.append( - self.kernels_path[i] + "/" + kernel_path.stem + kernel_path.suffix) + self.kernels_path + "/" + kernel_path.stem + kernel_path.suffix) if self.config_template != "": path_to_definition = f"{self.config_path}/{self.attributes['name']}.{self.config_extension}"