diff --git a/.cproject b/.cproject index 4de095933..1d070ceed 100644 --- a/.cproject +++ b/.cproject @@ -1896,6 +1896,30 @@ true true + + make + -j5 + check install + true + false + true + + + make + -j2 + check install + true + true + true + + + make + -j2 + wrap.testWrap.run + true + true + true + make -j2 diff --git a/wrap/CMakeLists.txt b/wrap/CMakeLists.txt index 08af58d71..6b97822d2 100644 --- a/wrap/CMakeLists.txt +++ b/wrap/CMakeLists.txt @@ -18,13 +18,8 @@ install(FILES matlab.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/wrap) if (GTSAM_LINK_BINARIES_AGAINST_CONVENIENCE_LIBS) set(convenience_libs - slam - nonlinear - linear - inference - geometry base - ccolamd) + ) else (GTSAM_LINK_BINARIES_AGAINST_CONVENIENCE_LIBS) set(convenience_libs gtsam-static) diff --git a/wrap/Module.cpp b/wrap/Module.cpp index bf029fda0..efaac5be4 100644 --- a/wrap/Module.cpp +++ b/wrap/Module.cpp @@ -25,7 +25,6 @@ #include #include -//#include using namespace std; using namespace wrap; @@ -98,7 +97,7 @@ Module::Module(const string& interfacePath, Rule classArg_p = !str_p("const") [assign_a(arg.is_const,true)] >> *namespace_arg_p >> - className_p [assign_a(arg.type)] >> + className_p[assign_a(arg.type)] >> (ch_p('*')[assign_a(arg.is_ptr,true)] | ch_p('&')[assign_a(arg.is_ref,true)]); Rule name_p = lexeme_d[alpha_p >> *(alnum_p | '_')]; @@ -199,10 +198,12 @@ Module::Module(const string& interfacePath, str_p("using") >> str_p("namespace") >> namespace_name_p[push_back_a(using_namespaces)] >> ch_p(';'); - Rule forward_delcaration_p = - (str_p("class") >> className_p >> ch_p(';'))[push_back_a(forward_declarations, class_name)]; + Rule forward_declaration_p = + str_p("class") >> + (*(namespace_name_p >> str_p("::")) >> className_p)[push_back_a(forward_declarations)] + >> ch_p(';'); - Rule module_content_p = comments_p | using_namespace_p | forward_delcaration_p | class_p | namespace_def_p ; + Rule module_content_p = comments_p | using_namespace_p | class_p | forward_declaration_p | namespace_def_p ; Rule module_p = *module_content_p >> !end_p; diff --git a/wrap/tests/geometry.h b/wrap/tests/geometry.h index 635f0ba39..17fa85933 100644 --- a/wrap/tests/geometry.h +++ b/wrap/tests/geometry.h @@ -5,6 +5,7 @@ using namespace geometry; class VectorNotEigen; +class ns::OtherClass; class Point2 { Point2(); diff --git a/wrap/tests/testWrap.cpp b/wrap/tests/testWrap.cpp index ea320374c..5cad10cfd 100644 --- a/wrap/tests/testWrap.cpp +++ b/wrap/tests/testWrap.cpp @@ -76,7 +76,7 @@ TEST( wrap, parse ) { EXPECT(assert_equal(exp_using, module.using_namespaces)); // forward declarations - strvec exp_forward; exp_forward += "VectorNotEigen"; + strvec exp_forward; exp_forward += "VectorNotEigen", "ns::OtherClass"; EXPECT(assert_equal(exp_forward, module.forward_declarations)); // check first class, Point2