diff --git a/gtsam.h b/gtsam.h index 0e2367cc6..315071f65 100644 --- a/gtsam.h +++ b/gtsam.h @@ -834,7 +834,7 @@ class Odometry { // Simulated2D //************************************************************************* -#include +#include namespace simulated2D { class Values { @@ -856,7 +856,7 @@ class Graph { }///\namespace simulated2D // Simulated2DOriented Example Domain -#include +#include namespace simulated2DOriented { class Values { diff --git a/gtsam_unstable/CMakeLists.txt b/gtsam_unstable/CMakeLists.txt index 7a7af3232..2d9f597bd 100644 --- a/gtsam_unstable/CMakeLists.txt +++ b/gtsam_unstable/CMakeLists.txt @@ -6,7 +6,6 @@ set (gtsam_unstable_subdirs dynamics linear nonlinear - slam ) add_custom_target(check.unstable COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure) @@ -33,7 +32,6 @@ set(gtsam_unstable_srcs ${dynamics_srcs} ${linear_srcs} ${nonlinear_srcs} - ${slam_srcs} ) option (GTSAM_UNSTABLE_BUILD_SHARED_LIBRARY "Enable/Disable building of a shared version of gtsam_unstable" ON) diff --git a/gtsam_unstable/slam/CMakeLists.txt b/gtsam_unstable/slam/CMakeLists.txt deleted file mode 100644 index afe453279..000000000 --- a/gtsam_unstable/slam/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# Install headers -file(GLOB slam_headers "*.h") -install(FILES ${slam_headers} DESTINATION include/gtsam_unstable/slam) - -# Components to link tests in this subfolder against -set(slam_local_libs - slam_unstable - slam - nonlinear - linear - inference - geometry - base - ccolamd -) - -set (slam_full_libs - gtsam-static - gtsam_unstable-static) - -# Exclude tests that don't work -set (slam_excluded_tests "") - -# Add all tests -gtsam_add_subdir_tests(slam_unstable "${slam_local_libs}" "${slam_full_libs}" "${slam_excluded_tests}") -add_dependencies(check.unstable check.slam_unstable) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4d29dd557..9e4c501d4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,14 @@ +# Build a library of example domains, just for tests +file(GLOB test_lib_srcs "*.cpp") +file(GLOB test_srcs "test*.cpp") +file(GLOB time_srcs "time*.cpp") +list(REMOVE_ITEM test_lib_srcs ${test_srcs}) +list(REMOVE_ITEM test_lib_srcs ${time_srcs}) +add_library(test_lib STATIC ${test_lib_srcs}) + +# Assemble local libraries set(tests_local_libs + test_lib slam nonlinear linear @@ -24,7 +34,7 @@ if (GTSAM_BUILD_TESTS) # Build grouped tests gtsam_add_grouped_scripts("tests" # Use subdirectory as group label "test*.cpp" check "Test" # Standard for all tests - "${tests_local_libs}" "gtsam-static;CppUnitLite" "${tests_exclude}" # Pass in linking and exclusion lists + "${tests_local_libs}" "gtsam-static;CppUnitLite;test_lib" "${tests_exclude}" # Pass in linking and exclusion lists ${is_test}) # Set all as tests endif (GTSAM_BUILD_TESTS) @@ -37,6 +47,6 @@ if (GTSAM_BUILD_TIMING) # Build grouped benchmarks gtsam_add_grouped_scripts("tests" # Use subdirectory as group label "time*.cpp" timing "Timing Benchmark" # Standard for all timing scripts - "${tests_local_libs}" "gtsam-static;CppUnitLite" "${tests_exclude}" # Pass in linking and exclusion lists + "${tests_local_libs}" "gtsam-static;CppUnitLite;test_lib" "${tests_exclude}" # Pass in linking and exclusion lists ${is_test}) endif (GTSAM_BUILD_TIMING) diff --git a/gtsam/slam/simulated2D.cpp b/tests/simulated2D.cpp similarity index 97% rename from gtsam/slam/simulated2D.cpp rename to tests/simulated2D.cpp index 95dfef0e5..199a6756b 100644 --- a/gtsam/slam/simulated2D.cpp +++ b/tests/simulated2D.cpp @@ -15,7 +15,7 @@ * @author Frank Dellaert */ -#include +#include namespace simulated2D { diff --git a/gtsam/slam/simulated2D.h b/tests/simulated2D.h similarity index 100% rename from gtsam/slam/simulated2D.h rename to tests/simulated2D.h diff --git a/gtsam/slam/simulated2DConstraints.h b/tests/simulated2DConstraints.h similarity index 99% rename from gtsam/slam/simulated2DConstraints.h rename to tests/simulated2DConstraints.h index 4594a8e1f..cf0266d86 100644 --- a/gtsam/slam/simulated2DConstraints.h +++ b/tests/simulated2DConstraints.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include // \namespace diff --git a/gtsam/slam/simulated2DOriented.cpp b/tests/simulated2DOriented.cpp similarity index 96% rename from gtsam/slam/simulated2DOriented.cpp rename to tests/simulated2DOriented.cpp index 947aaddc5..c7d1d8469 100644 --- a/gtsam/slam/simulated2DOriented.cpp +++ b/tests/simulated2DOriented.cpp @@ -15,7 +15,7 @@ * @author Frank Dellaert */ -#include +#include namespace simulated2DOriented { diff --git a/gtsam/slam/simulated2DOriented.h b/tests/simulated2DOriented.h similarity index 100% rename from gtsam/slam/simulated2DOriented.h rename to tests/simulated2DOriented.h diff --git a/gtsam_unstable/slam/simulated3D.cpp b/tests/simulated3D.cpp similarity index 95% rename from gtsam_unstable/slam/simulated3D.cpp rename to tests/simulated3D.cpp index 933d1f194..980b6cabd 100644 --- a/gtsam_unstable/slam/simulated3D.cpp +++ b/tests/simulated3D.cpp @@ -15,7 +15,7 @@ * @author Alex Cunningham **/ -#include +#include namespace gtsam { diff --git a/gtsam_unstable/slam/simulated3D.h b/tests/simulated3D.h similarity index 100% rename from gtsam_unstable/slam/simulated3D.h rename to tests/simulated3D.h diff --git a/gtsam/slam/smallExample.cpp b/tests/smallExample.cpp similarity index 99% rename from gtsam/slam/smallExample.cpp rename to tests/smallExample.cpp index 9937847ae..b518bebe5 100644 --- a/gtsam/slam/smallExample.cpp +++ b/tests/smallExample.cpp @@ -17,7 +17,6 @@ * @author Frank dellaert */ -#include #include #include #include @@ -25,6 +24,8 @@ #include #include +#include + #include #include diff --git a/gtsam/slam/smallExample.h b/tests/smallExample.h similarity index 99% rename from gtsam/slam/smallExample.h rename to tests/smallExample.h index 3b3b200b8..161c45da8 100644 --- a/gtsam/slam/smallExample.h +++ b/tests/smallExample.h @@ -21,7 +21,7 @@ #pragma once -#include +#include #include #include #include diff --git a/tests/testBoundingConstraint.cpp b/tests/testBoundingConstraint.cpp index 3956b2934..128251a23 100644 --- a/tests/testBoundingConstraint.cpp +++ b/tests/testBoundingConstraint.cpp @@ -15,7 +15,7 @@ * @author Alex Cunningham */ -#include +#include #include #include #include diff --git a/tests/testDoglegOptimizer.cpp b/tests/testDoglegOptimizer.cpp index 529b1b2f1..9a4f6bf25 100644 --- a/tests/testDoglegOptimizer.cpp +++ b/tests/testDoglegOptimizer.cpp @@ -16,7 +16,7 @@ */ #include -#include +#include #include #include #include diff --git a/tests/testGaussianBayesNet.cpp b/tests/testGaussianBayesNet.cpp index 8444dacc3..60af529ec 100644 --- a/tests/testGaussianBayesNet.cpp +++ b/tests/testGaussianBayesNet.cpp @@ -29,7 +29,7 @@ using namespace boost::assign; #include #include #include -#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testGaussianFactor.cpp b/tests/testGaussianFactor.cpp index 077dc44be..bc0040f37 100644 --- a/tests/testGaussianFactor.cpp +++ b/tests/testGaussianFactor.cpp @@ -16,7 +16,7 @@ * @author Frank Dellaert **/ -#include +#include #include #include #include diff --git a/tests/testGaussianFactorGraphB.cpp b/tests/testGaussianFactorGraphB.cpp index 0f76af4f6..718dbc302 100644 --- a/tests/testGaussianFactorGraphB.cpp +++ b/tests/testGaussianFactorGraphB.cpp @@ -15,7 +15,7 @@ * @author Christian Potthast **/ -#include +#include #include #include #include diff --git a/tests/testGaussianISAM.cpp b/tests/testGaussianISAM.cpp index 03a747196..a6eccd70f 100644 --- a/tests/testGaussianISAM.cpp +++ b/tests/testGaussianISAM.cpp @@ -15,7 +15,7 @@ * @author Michael Kaess */ -#include +#include #include #include #include diff --git a/tests/testGaussianISAM2.cpp b/tests/testGaussianISAM2.cpp index c74dbe276..c79e4e8fc 100644 --- a/tests/testGaussianISAM2.cpp +++ b/tests/testGaussianISAM2.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/testGaussianJunctionTreeB.cpp b/tests/testGaussianJunctionTreeB.cpp index 03e2d27d3..5b7555d37 100644 --- a/tests/testGaussianJunctionTreeB.cpp +++ b/tests/testGaussianJunctionTreeB.cpp @@ -15,7 +15,7 @@ * @author nikai */ -#include +#include #include #include #include diff --git a/tests/testInferenceB.cpp b/tests/testInferenceB.cpp index c054b9b6a..81b24a1e7 100644 --- a/tests/testInferenceB.cpp +++ b/tests/testInferenceB.cpp @@ -20,9 +20,10 @@ #include #include #include -#include #include +#include + using namespace std; using namespace gtsam; diff --git a/tests/testNonlinearEquality.cpp b/tests/testNonlinearEquality.cpp index 2b35e9f60..9a139e581 100644 --- a/tests/testNonlinearEquality.cpp +++ b/tests/testNonlinearEquality.cpp @@ -14,8 +14,9 @@ * @author Alex Cunningham */ +#include + #include -#include #include #include #include diff --git a/tests/testNonlinearFactor.cpp b/tests/testNonlinearFactor.cpp index e203bcf94..00fa217c6 100644 --- a/tests/testNonlinearFactor.cpp +++ b/tests/testNonlinearFactor.cpp @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tests/testNonlinearFactorGraph.cpp b/tests/testNonlinearFactorGraph.cpp index d1d240a67..7d9160c1d 100644 --- a/tests/testNonlinearFactorGraph.cpp +++ b/tests/testNonlinearFactorGraph.cpp @@ -29,7 +29,7 @@ using namespace boost::assign; #include #include -#include +#include #include #include #include diff --git a/tests/testNonlinearOptimizer.cpp b/tests/testNonlinearOptimizer.cpp index 7cb8bb045..ee681db3e 100644 --- a/tests/testNonlinearOptimizer.cpp +++ b/tests/testNonlinearOptimizer.cpp @@ -15,7 +15,7 @@ * @author Frank Dellaert */ -#include +#include #include #include #include diff --git a/gtsam/slam/tests/testSerializationSLAM.cpp b/tests/testSerializationSLAM.cpp similarity index 99% rename from gtsam/slam/tests/testSerializationSLAM.cpp rename to tests/testSerializationSLAM.cpp index 275abe1b8..7650925d1 100644 --- a/gtsam/slam/tests/testSerializationSLAM.cpp +++ b/tests/testSerializationSLAM.cpp @@ -16,7 +16,8 @@ * @date Feb 7, 2012 */ -#include +#include + #include #include #include diff --git a/gtsam/slam/tests/testSimulated2D.cpp b/tests/testSimulated2D.cpp similarity index 98% rename from gtsam/slam/tests/testSimulated2D.cpp rename to tests/testSimulated2D.cpp index b72a8f4c0..165177a56 100644 --- a/gtsam/slam/tests/testSimulated2D.cpp +++ b/tests/testSimulated2D.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include using namespace std; using namespace gtsam; diff --git a/gtsam/slam/tests/testSimulated2DOriented.cpp b/tests/testSimulated2DOriented.cpp similarity index 96% rename from gtsam/slam/tests/testSimulated2DOriented.cpp rename to tests/testSimulated2DOriented.cpp index d017512ce..24fe6ec4e 100644 --- a/gtsam/slam/tests/testSimulated2DOriented.cpp +++ b/tests/testSimulated2DOriented.cpp @@ -16,8 +16,8 @@ * @brief unit tests for simulated2DOriented */ -#include -#include +#include +#include #include #include #include diff --git a/gtsam_unstable/slam/tests/testSimulated3D.cpp b/tests/testSimulated3D.cpp similarity index 97% rename from gtsam_unstable/slam/tests/testSimulated3D.cpp rename to tests/testSimulated3D.cpp index 7283544a1..be9548a8e 100644 --- a/gtsam_unstable/slam/tests/testSimulated3D.cpp +++ b/tests/testSimulated3D.cpp @@ -15,7 +15,7 @@ * @author Alex Cunningham **/ -#include +#include #include #include #include diff --git a/tests/testSubgraphPreconditioner.cpp b/tests/testSubgraphPreconditioner.cpp index 747e35914..0f18924da 100644 --- a/tests/testSubgraphPreconditioner.cpp +++ b/tests/testSubgraphPreconditioner.cpp @@ -16,7 +16,7 @@ **/ #include -#include +#include #include #include #include diff --git a/tests/testSymbolicBayesNetB.cpp b/tests/testSymbolicBayesNetB.cpp index 4f0d04595..f2e9772ec 100644 --- a/tests/testSymbolicBayesNetB.cpp +++ b/tests/testSymbolicBayesNetB.cpp @@ -22,7 +22,7 @@ using namespace boost::assign; #include #include -#include +#include #include #include #include diff --git a/tests/testSymbolicFactorGraphB.cpp b/tests/testSymbolicFactorGraphB.cpp index 8fde094ed..7d657c9bf 100644 --- a/tests/testSymbolicFactorGraphB.cpp +++ b/tests/testSymbolicFactorGraphB.cpp @@ -15,7 +15,7 @@ * @author Frank Dellaert */ -#include +#include #include #include #include diff --git a/tests/timeGaussianFactorGraph.cpp b/tests/timeGaussianFactorGraph.cpp index aff3ff150..f8d76c1dd 100644 --- a/tests/timeGaussianFactorGraph.cpp +++ b/tests/timeGaussianFactorGraph.cpp @@ -19,7 +19,7 @@ #include #include // for operator += in Ordering #include -#include +#include #include using namespace std;