summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-07-31 18:23:35 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-07-31 18:38:02 -0300
commitdccd68491cd5a3bc8ed3ab925cb36d514025d537 (patch)
treeb6d8956af371f60512222b70ace767a31be89ef3
parenteb938f8a886ea211e5a99b4fceab64e4461dc771 (diff)
eolian-cxx: Generate eot files
Summary: Eolian Type files were not being generated, which made some template specialization to not be defined, for example for function_wrappers. Reviewers: bu5hm4n, woohyun, lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9468
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc25
-rw-r--r--src/bindings/cxx/meson.build18
2 files changed, 42 insertions, 1 deletions
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 3774c497a6..1e0842873d 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -305,7 +305,26 @@ run(options_type const& opts)
305 } 305 }
306 else 306 else
307 { 307 {
308 std::abort(); 308 if (!types_generate(base, opts, cpp_types_header))
309 {
310 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
311 << "Error generating: " << ::eolian_class_short_name_get(klass)
312 << std::endl;
313 assert(false && "error generating class");
314 }
315 else
316 {
317 std::ofstream header_decl;
318 header_decl.open(opts.out_file);
319 if (!header_decl.good())
320 {
321 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
322 << "Can't open output file: " << opts.out_file << std::endl;
323 assert(false && "error opening file");
324 }
325 std::copy (cpp_types_header.begin(), cpp_types_header.end()
326 , std::ostream_iterator<char>(header_decl));
327 }
309 } 328 }
310 } 329 }
311 else 330 else
@@ -336,6 +355,10 @@ run(options_type const& opts)
336 headers.insert(filename + std::string(".hh")); 355 headers.insert(filename + std::string(".hh"));
337 eo_files.insert(filename); 356 eo_files.insert(filename);
338 } 357 }
358 else
359 {
360 headers.insert (base + std::string(".hh"));
361 }
339 } 362 }
340 363
341 using efl::eolian::grammar::header_include_directive; 364 using efl::eolian::grammar::header_include_directive;
diff --git a/src/bindings/cxx/meson.build b/src/bindings/cxx/meson.build
index 3401a43c3f..e62b7a2387 100644
--- a/src/bindings/cxx/meson.build
+++ b/src/bindings/cxx/meson.build
@@ -39,6 +39,24 @@ foreach lib : cxx_sublibs
39 #generate files for each .eo files 39 #generate files for each .eo files
40 foreach eo_file_subdir : eo_file_subdirs 40 foreach eo_file_subdir : eo_file_subdirs
41 if eo_file_subdir != '' 41 if eo_file_subdir != ''
42 cxx_pub_eot_files = get_variable(package_name + '_' + eo_file_subdir +'_eot_files')
43 else
44 cxx_pub_eot_files = get_variable(package_name +'_eot_files')
45 endif
46 subdir_file_location = join_paths(file_location, eo_file_subdir)
47 foreach cxx_gen_file : cxx_pub_eot_files
48 cxx_generator_target += custom_target('eolian_cxx_gen_'+cxx_gen_file.underscorify()+'',
49 input : join_paths(subdir_file_location, cxx_gen_file),
50 output : [cxx_gen_file + '.hh'],
51 install : true,
52 install_dir : join_paths(dir_include, package_version_name, eo_file_subdir),
53 command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories,
54 '-o', join_paths(meson.current_build_dir(), cxx_gen_file + '.hh'),
55 '@INPUT@'])
56 eo_file_list += files(join_paths(subdir_file_location, cxx_gen_file))
57 endforeach
58
59 if eo_file_subdir != ''
42 cxx_pub_eo_files = get_variable(package_name + '_' + eo_file_subdir +'_eo_files') 60 cxx_pub_eo_files = get_variable(package_name + '_' + eo_file_subdir +'_eo_files')
43 else 61 else
44 cxx_pub_eo_files = get_variable(package_name +'_eo_files') 62 cxx_pub_eo_files = get_variable(package_name +'_eo_files')