diff --git a/.cproject b/.cproject
index c6699da3e..00c33f6be 100644
--- a/.cproject
+++ b/.cproject
@@ -311,6 +311,14 @@
true
true
+
+ make
+ -j2
+ testGaussianFactor.run
+ true
+ true
+ true
+
make
-j2
@@ -337,7 +345,6 @@
make
-
tests/testBayesTree.run
true
false
@@ -345,7 +352,6 @@
make
-
testBinaryBayesNet.run
true
false
@@ -393,7 +399,6 @@
make
-
testSymbolicBayesNet.run
true
false
@@ -401,7 +406,6 @@
make
-
tests/testSymbolicFactor.run
true
false
@@ -409,7 +413,6 @@
make
-
testSymbolicFactorGraph.run
true
false
@@ -425,20 +428,11 @@
make
-
tests/testBayesTree
true
false
true
-
- make
- -j2
- testGaussianFactor.run
- true
- true
- true
-
make
-j2
@@ -465,6 +459,7 @@
make
+
testGraph.run
true
false
@@ -536,6 +531,7 @@
make
+
testInference.run
true
false
@@ -543,6 +539,7 @@
make
+
testGaussianFactor.run
true
false
@@ -550,6 +547,7 @@
make
+
testJunctionTree.run
true
false
@@ -557,6 +555,7 @@
make
+
testSymbolicBayesNet.run
true
false
@@ -564,6 +563,7 @@
make
+
testSymbolicFactorGraph.run
true
false
@@ -633,22 +633,6 @@
false
true
-
- make
- -j2
- tests/testPose2.run
- true
- true
- true
-
-
- make
- -j2
- tests/testPose3.run
- true
- true
- true
-
make
-j2
@@ -665,6 +649,22 @@
true
true
+
+ make
+ -j2
+ tests/testPose2.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ tests/testPose3.run
+ true
+ true
+ true
+
make
-j2
@@ -689,26 +689,18 @@
true
true
-
+
make
- -j2
- all
+ -j5
+ nonlinear.testValues.run
true
true
true
-
+
make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
+ -j5
+ nonlinear.testOrdering.run
true
true
true
@@ -745,18 +737,26 @@
true
true
-
+
make
- -j5
- nonlinear.testValues.run
+ -j2
+ all
true
true
true
-
+
make
- -j5
- nonlinear.testOrdering.run
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
true
true
true
@@ -793,30 +793,6 @@
true
true
-
- make
- -j2
- install
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
make
-j2
@@ -1091,7 +1067,6 @@
make
-
testErrors.run
true
false
@@ -1547,6 +1522,7 @@
make
+
testSimulated2DOriented.run
true
false
@@ -1586,6 +1562,7 @@
make
+
testSimulated2D.run
true
false
@@ -1593,6 +1570,7 @@
make
+
testSimulated3D.run
true
false
@@ -1776,6 +1754,7 @@
make
+
tests/testGaussianISAM2
true
false
@@ -1797,6 +1776,102 @@
true
true
+
+ make
+ -j2
+ testRot3.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testRot2.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose3.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ timeRot3.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPose2.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testCal3_S2.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testSimpleCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testHomography2.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testCalibratedCamera.run
+ true
+ true
+ true
+
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j2
+ testPoint2.run
+ true
+ true
+ true
+
make
-j2
@@ -1980,137 +2055,18 @@
true
true
-
+
make
- -j2
- testRot3.run
+ -j5
+ wrap_gtsam
true
true
true
-
+
make
- -j2
- testRot2.run
- true
- true
- true
-
-
- make
- -j2
- testPose3.run
- true
- true
- true
-
-
- make
- -j2
- timeRot3.run
- true
- true
- true
-
-
- make
- -j2
- testPose2.run
- true
- true
- true
-
-
- make
- -j2
- testCal3_S2.run
- true
- true
- true
-
-
- make
- -j2
- testSimpleCamera.run
- true
- true
- true
-
-
- make
- -j2
- testHomography2.run
- true
- true
- true
-
-
- make
- -j2
- testCalibratedCamera.run
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j2
- testPoint2.run
- true
- true
- true
-
-
- make
- -j2
- check
- true
- true
- true
-
-
- make
- -j2
- clean
- true
- true
- true
-
-
- make
- -j2
- install
- true
- true
- true
-
-
- make
- -j2
- all
- true
- true
- true
-
-
- cmake
- ..
+ VERBOSE=1
+ wrap_gtsam
true
false
true
@@ -2155,6 +2111,45 @@
true
true
+
+ make
+ -j2
+ check
+ true
+ true
+ true
+
+
+ make
+ -j2
+ clean
+ true
+ true
+ true
+
+
+ make
+ -j2
+ install
+ true
+ true
+ true
+
+
+ make
+ -j2
+ all
+ true
+ true
+ true
+
+
+ cmake
+ ..
+ true
+ false
+ true
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebfd16e5f..04bc6ccf2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,16 +58,23 @@ if(NOT FIRST_PASS_DONE)
endif()
# Configurable Options
-option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
-option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" ON)
-option(GTSAM_BUILD_EXAMPLES "Enable/Disable building of examples" ON)
-option(GTSAM_BUILD_WRAP "Enable/Disable building of matlab wrap utility (necessary for matlab interface)" ON)
-option(GTSAM_USE_QUATERNIONS "Enable/Disable using an internal Quaternion representation for rotations instead of rotation matrices" OFF)
+#SET(FOO_BUILD_SHARED OFF CACHE BOOL "Build libfoo shared library")
+#set(GTSAM_BUILD_TESTS ON CACHE BOOL "Enable/Disable building of tests")
+#set(GTSAM_BUILD_TIMING ON CACHE BOOL "Enable/Disable building of timing scripts")
+#set(GTSAM_BUILD_EXAMPLES ON CACHE BOOL "Enable/Disable building of examples")
+#set(GTSAM_BUILD_WRAP ON CACHE BOOL "Enable/Disable building of matlab wrap utility (necessary for matlab interface)")
+#set(GTSAM_BUILD_CONVENIENCE_LIBRARIES OFF CACHE BOOL "Enable/Disable use of convenience libraries for faster development rebuilds, but slower install")
+
+option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
+option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" ON)
+option(GTSAM_BUILD_EXAMPLES "Enable/Disable building of examples" ON)
+option(GTSAM_BUILD_WRAP "Enable/Disable building of matlab wrap utility (necessary for matlab interface)" ON)
+option(GTSAM_USE_QUATERNIONS "Enable/Disable using an internal Quaternion representation for rotations instead of rotation matrices" OFF)
option(GTSAM_BUILD_CONVENIENCE_LIBRARIES "Enable/Disable use of convenience libraries for faster development rebuilds, but slower install" ON)
-option(GTSAM_INSTALL_MATLAB_TOOLBOX "Enable/Disable installation of matlab toolbox" ON)
-option(GTSAM_INSTALL_MATLAB_EXAMPLES "Enable/Disable installation of matlab examples" ON)
-option(GTSAM_INSTALL_MATLAB_TESTS "Enable/Disable installation of matlab tests" ON)
-option(GTSAM_INSTALL_WRAP "Enable/Disable installation of wrap utility" ON)
+option(GTSAM_INSTALL_MATLAB_TOOLBOX "Enable/Disable installation of matlab toolbox" ON)
+option(GTSAM_INSTALL_MATLAB_EXAMPLES "Enable/Disable installation of matlab examples" ON)
+option(GTSAM_INSTALL_MATLAB_TESTS "Enable/Disable installation of matlab tests" ON)
+option(GTSAM_INSTALL_WRAP "Enable/Disable installation of wrap utility" ON)
# Add the Quaternion Build Flag if requested
if (GTSAM_USE_QUATERNIONS)
@@ -126,6 +133,11 @@ endif(GTSAM_BUILD_EXAMPLES)
set(FIRST_PASS_DONE true CACHE BOOL "Internally used to mark whether cmake has been run multiple times")
mark_as_advanced(FIRST_PASS_DONE)
+# Record the root dir for gtsam - needed during external builds, e.g., ROS
+set(GTSAM_SOURCE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+message(STATUS "GTSAM_SOURCE_ROOT_DIR: [${GTSAM_SOURCE_ROOT_DIR}]")
+
+
# print configuration variables
message(STATUS "===============================================================")
message(STATUS "================ Configuration Options ======================")
diff --git a/wrap/CMakeLists.txt b/wrap/CMakeLists.txt
index 4e045cf66..d753c5d76 100644
--- a/wrap/CMakeLists.txt
+++ b/wrap/CMakeLists.txt
@@ -37,9 +37,14 @@ set(moduleName gtsam)
include(GtsamMatlabWrap)
find_mexextension()
+# get binary path for wrap executable to allow for different build configurations (e.g., ROS)
+if (NOT EXECUTABLE_OUTPUT_PATH)
+ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
+endif()
+
# Code generation command
add_custom_target(wrap_gtsam ALL COMMAND
- ./wrap ${GTSAM_MEX_BIN_EXTENSION} ${CMAKE_SOURCE_DIR} ${moduleName} ${toolbox_path} "${mexFlags}"
+ ${EXECUTABLE_OUTPUT_PATH}/wrap ${GTSAM_MEX_BIN_EXTENSION} ${CMAKE_CURRENT_SOURCE_DIR}/../ ${moduleName} ${toolbox_path} "${mexFlags}"
DEPENDS wrap)
set(GTSAM_TOOLBOX_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/borg/toolbox CACHE DOCSTRING "Path to install matlab toolbox")
diff --git a/wrap/wrap.cpp b/wrap/wrap.cpp
index 8801fef76..f55927a5e 100644
--- a/wrap/wrap.cpp
+++ b/wrap/wrap.cpp
@@ -45,19 +45,28 @@ void generate_matlab_toolbox(const string& mexExt,
module.matlab_code(toolboxPath,mexExt,mexFlags);
}
+/** Displays usage information */
+void usage() {
+ cerr << "wrap parses an interface file and produces a MATLAB toolbox" << endl;
+ cerr << "usage: wrap mexExtension interfacePath moduleName toolboxPath [mexFlags]" << endl;
+ cerr << " mexExtension : OS/CPU-dependent extension for MEX binaries" << endl;
+ cerr << " interfacePath : *absolute* path to directory of module interface file" << endl;
+ cerr << " moduleName : the name of the module, interface file must be called moduleName.h" << endl;
+ cerr << " toolboxPath : the directory in which to generate the wrappers" << endl;
+ cerr << " [mexFlags] : extra flags for the mex command" << endl;
+}
+
/**
* main parses arguments and calls generate_matlab_toolbox above
* Typically called from "make all" using appropriate arguments
*/
int main(int argc, const char* argv[]) {
if (argc<6 || argc>7) {
- cerr << "wrap parses an interface file and produces a MATLAB toolbox" << endl;
- cerr << "usage: wrap mexExtension interfacePath moduleName toolboxPath [mexFlags]" << endl;
- cerr << " mexExtension : OS/CPU-dependent extension for MEX binaries" << endl;
- cerr << " interfacePath : *absolute* path to directory of module interface file" << endl;
- cerr << " moduleName : the name of the module, interface file must be called moduleName.h" << endl;
- cerr << " toolboxPath : the directory in which to generate the wrappers" << endl;
- cerr << " [mexFlags] : extra flags for the mex command" << endl;
+ cerr << "Invalid arguments:\n";
+ for (int i=0; i