From ab3e3773ec0ecae3905655d11c1eb82302ceeb57 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Wed, 21 Jun 2023 13:25:36 -0500 Subject: [PATCH 1/2] removed boost from TableFactor and added guards to testSerializationSlam --- gtsam/discrete/TableFactor.cpp | 3 +-- tests/testSerializationSlam.cpp | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gtsam/discrete/TableFactor.cpp b/gtsam/discrete/TableFactor.cpp index acb59a8be..5fe3cd9d1 100644 --- a/gtsam/discrete/TableFactor.cpp +++ b/gtsam/discrete/TableFactor.cpp @@ -21,7 +21,6 @@ #include #include -#include #include using namespace std; @@ -203,7 +202,7 @@ void TableFactor::print(const string& s, const KeyFormatter& formatter) const { cout << s; cout << " f["; for (auto&& key : keys()) - cout << boost::format(" (%1%,%2%),") % formatter(key) % cardinality(key); + cout << " (" << formatter(key) << "," << cardinality(key) << "),"; cout << " ]" << endl; for (SparseIt it(sparse_table_); it; ++it) { DiscreteValues assignment = findAssignments(it.index()); diff --git a/tests/testSerializationSlam.cpp b/tests/testSerializationSlam.cpp index c4170b108..6b504a810 100644 --- a/tests/testSerializationSlam.cpp +++ b/tests/testSerializationSlam.cpp @@ -52,6 +52,8 @@ #include #include +#ifdef GTSAM_USE_BOOST_FEATURES + #include #include @@ -674,6 +676,8 @@ TEST(SubgraphSolver, Solves) { } } +#endif + /* ************************************************************************* */ int main() { TestResult tr; return TestRegistry::runAllTests(tr); } /* ************************************************************************* */ From 475184cb3ccd7a3109da42fabd33306ed01cea12 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Thu, 22 Jun 2023 09:46:21 -0500 Subject: [PATCH 2/2] Removed boost guards from testSerializationSlam and fixed CMakeLists --- tests/CMakeLists.txt | 2 +- tests/testSerializationSlam.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d7b68c4ec..44b7505fc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,7 +13,7 @@ if (NOT GTSAM_USE_BOOST_FEATURES) endif() if (NOT GTSAM_ENABLE_BOOST_SERIALIZATION) - list(APPEND excluded_tests "testSerializationSLAM.cpp") + list(APPEND excluded_tests "testSerializationSlam.cpp") endif() # Build tests diff --git a/tests/testSerializationSlam.cpp b/tests/testSerializationSlam.cpp index 6b504a810..c4170b108 100644 --- a/tests/testSerializationSlam.cpp +++ b/tests/testSerializationSlam.cpp @@ -52,8 +52,6 @@ #include #include -#ifdef GTSAM_USE_BOOST_FEATURES - #include #include @@ -676,8 +674,6 @@ TEST(SubgraphSolver, Solves) { } } -#endif - /* ************************************************************************* */ int main() { TestResult tr; return TestRegistry::runAllTests(tr); } /* ************************************************************************* */