diff --git a/src/tests/eina_cxx/eina_cxx_suite.h b/src/tests/eina_cxx/eina_cxx_suite.h index 0c6e633858..ac6548a3f2 100644 --- a/src/tests/eina_cxx/eina_cxx_suite.h +++ b/src/tests/eina_cxx/eina_cxx_suite.h @@ -1,6 +1,7 @@ #ifndef _EINA_CXX_SUITE_H #define _EINA_CXX_SUITE_H +#ifdef __cplusplus #include #include @@ -18,5 +19,8 @@ void eina_test_thread(TCase* tc); void eina_test_optional(TCase* tc); void eina_test_value(TCase* tc); void eina_test_log(TCase* tc); +#endif +#define EINA_CXX_TEST_API +#define EINA_CXX_TEST_API_WEAK #endif /* _EINA_CXX_SUITE_H */ diff --git a/src/tests/eina_cxx/meson.build b/src/tests/eina_cxx/meson.build index facad4a9af..5d448d7f72 100644 --- a/src/tests/eina_cxx/meson.build +++ b/src/tests/eina_cxx/meson.build @@ -30,6 +30,7 @@ foreach eo_file : pub_eo_files command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), + '-e', 'EINA_CXX_TEST_API', '-gch', '@INPUT@']) priv_eo_file_target += custom_target('eolian_cxx_gen_eina_cxx_' + eo_file, input : eo_file, diff --git a/src/tests/eina_cxx/simple.c b/src/tests/eina_cxx/simple.c index 9a944c4039..cc0e88257e 100644 --- a/src/tests/eina_cxx/simple.c +++ b/src/tests/eina_cxx/simple.c @@ -8,6 +8,8 @@ #include +#include "eina_cxx_suite.h" + #include "eina_simple.eo.h" #define MY_CLASS EINA_SIMPLE_CLASS