Skip to content

Commit

Permalink
Fix c++ module files
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Dec 11, 2023
1 parent 6db63a1 commit d8d2c66
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 11 deletions.
14 changes: 9 additions & 5 deletions crates/re_types_builder/src/codegen/cpp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@ impl CppCodeGenerator {
let header_file_names = ordered_objects
.iter()
.filter(|obj| obj.is_testing() == testing)
.map(|obj| format!("{folder_name}/{}.hpp", obj.snake_case_name()));
.map(|obj| format!("{folder_name}/{}.hpp", obj.snake_case_name()))
.collect_vec();
if header_file_names.is_empty() {
continue;
}
let tokens = quote! {
#pragma_once
#(#hash include #header_file_names "NEWLINE_TOKEN")*
Expand All @@ -223,10 +227,10 @@ impl CppCodeGenerator {
} else {
&folder_path_sdk
};
let filepath = folder_path
.parent()
.unwrap()
.join(format!("{folder_name}.hpp"));
let filepath = folder_path.parent().unwrap().join(format!(
"{}.hpp",
object_kind.plural_snake_case().to_owned()
));
let contents = string_from_token_stream(&tokens, None);
files_to_write.insert(filepath, contents);
}
Expand Down
5 changes: 5 additions & 0 deletions rerun_cpp/src/rerun/blueprint/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions rerun_cpp/src/rerun/blueprint/blueprint/components.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions rerun_cpp/src/rerun/blueprint/blueprint/datatypes.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions rerun_cpp/src/rerun/blueprint/components.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions rerun_cpp/src/rerun/blueprint/datatypes.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions rerun_cpp/tests/generated/blueprint/blueprint/components.hpp

This file was deleted.

3 changes: 0 additions & 3 deletions rerun_cpp/tests/generated/blueprint/blueprint/datatypes.hpp

This file was deleted.

0 comments on commit d8d2c66

Please sign in to comment.