diff --git a/.cproject b/.cproject
index 1f29f86b7..9114e4159 100644
--- a/.cproject
+++ b/.cproject
@@ -1653,10 +1653,10 @@
true
true
-
+
make
- -j5
- PlanarSLAMExample.run
+ -j2
+ PlanarSLAMExample_easy.run
true
true
true
@@ -1685,10 +1685,10 @@
true
true
-
+
make
- -j5
- PlanarSLAMExample_selfcontained.run
+ -j2
+ PlanarSLAMSelfContained_advanced.run
true
true
true
@@ -1701,18 +1701,18 @@
true
true
-
+
make
- -j5
- Pose2SLAMExample.run
+ -j2
+ Pose2SLAMExample_easy.run
true
true
true
-
+
make
- -j5
- Pose2SLAMwSPCG.run
+ -j2
+ Pose2SLAMwSPCG_easy.run
true
true
true
@@ -1741,10 +1741,10 @@
true
true
-
+
make
-j5
- Pose2SLAMExample_graph.run
+ Pose2SLAMwSPCG_advanced.run
true
true
true
@@ -2152,6 +2152,30 @@
true
true
+
+ make
+ -j5
+ wrap_gtsam_build
+ true
+ true
+ true
+
+
+ make
+ -j5
+ wrap_gtsam_unstable_build
+ true
+ true
+ true
+
+
+ make
+ -j5
+ wrap_gtsam_unstable
+ true
+ true
+ true
+
make
-j5
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7819cfdc8..c0f273030 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,8 +61,12 @@ option(GTSAM_INSTALL_MATLAB_EXAMPLES "Enable/Disable installation of matlab
option(GTSAM_INSTALL_MATLAB_TESTS "Enable/Disable installation of matlab tests" ON)
option(GTSAM_INSTALL_WRAP "Enable/Disable installation of wrap utility" ON)
-# Experimental - features disabled by default
-option(GTSAM_ENABLE_BUILD_MEX_BINARIES "Enable/Disable building of matlab mex files" OFF)
+# TODO: Check for matlab mex binary before handling building of binaries
+
+# Flags for building/installing mex files
+option(GTSAM_ENABLE_BUILD_MEX_BINARIES "Enable/Disable building of matlab mex files" OFF)
+option(GTSAM_ENABLE_BUILD_MEX_BINARIES_ALL "Enable/Disable adding building of mex files to ALL target" OFF)
+set(GTSAM_BUILD_MEX_BINARY_FLAGS "-j2" CACHE STRING "Flags for running make on toolbox MEX files")
# Flags for choosing default packaging tools
set(CPACK_SOURCE_GENERATOR "TGZ" CACHE STRING "CPack Default Source Generator")
@@ -184,6 +188,8 @@ print_config_flag(${GTSAM_INSTALL_MATLAB_TOOLBOX} "Install matlab toolbox
print_config_flag(${GTSAM_INSTALL_MATLAB_EXAMPLES} "Install matlab examples ")
print_config_flag(${GTSAM_INSTALL_MATLAB_TESTS} "Install matlab tests ")
print_config_flag(${GTSAM_INSTALL_WRAP} "Install wrap utility ")
+print_config_flag(${GTSAM_ENABLE_BUILD_MEX_BINARIES} "Build MEX binaries ")
+print_config_flag(${GTSAM_ENABLE_BUILD_MEX_BINARIES_ALL} "Build MEX binaries on ALL target ")
message(STATUS "===============================================================")
# Include CPack *after* all flags
diff --git a/gtsam.h b/gtsam.h
index 2015705ae..f9062cd9e 100644
--- a/gtsam.h
+++ b/gtsam.h
@@ -201,7 +201,7 @@ class Pose3 {
Pose3();
Pose3(const gtsam::Pose3& pose);
Pose3(const gtsam::Rot3& r, const gtsam::Point3& t);
- Pose3(const gtsam::Pose2& pose2);
+ Pose3(const gtsam::Pose2& pose2); // FIXME: shadows Pose3(Pose3 pose)
Pose3(Matrix t);
// Testable
@@ -239,7 +239,7 @@ class Pose3 {
double y() const;
double z() const;
Matrix matrix() const;
- gtsam::Pose3 transform_to(const gtsam::Pose3& pose) const;
+ gtsam::Pose3 transform_to(const gtsam::Pose3& pose) const; // FIXME: shadows other transform_to()
double range(const gtsam::Point3& point);
// double range(const gtsam::Pose3& pose);
};
diff --git a/gtsam_unstable/CMakeLists.txt b/gtsam_unstable/CMakeLists.txt
index b50667f48..4b8b4ac11 100644
--- a/gtsam_unstable/CMakeLists.txt
+++ b/gtsam_unstable/CMakeLists.txt
@@ -91,14 +91,19 @@ if (GTSAM_BUILD_WRAP)
DEPENDS wrap)
# Build command
- # Experimental: requires matlab to be on your path
if (GTSAM_ENABLE_BUILD_MEX_BINARIES)
# Actually compile the mex files when building the library
- set(TOOLBOX_MAKE_FLAGS "-j2")
- add_custom_target(wrap_gtsam_unstable_build
- COMMAND make ${TOOLBOX_MAKE_FLAGS}
- WORKING_DIRECTORY ${toolbox_path}
- DEPENDS wrap_gtsam_unstable)
+ if (GTSAM_ENABLE_BUILD_MEX_BINARIES_ALL)
+ add_custom_target(wrap_gtsam_unstable_build ALL
+ COMMAND make ${GTSAM_BUILD_MEX_BINARY_FLAGS}
+ WORKING_DIRECTORY ${toolbox_path}
+ DEPENDS wrap_gtsam_unstable)
+ else()
+ add_custom_target(wrap_gtsam_unstable_build
+ COMMAND make ${GTSAM_BUILD_MEX_BINARY_FLAGS}
+ WORKING_DIRECTORY ${toolbox_path}
+ DEPENDS wrap_gtsam_unstable)
+ endif()
endif (GTSAM_ENABLE_BUILD_MEX_BINARIES)
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
diff --git a/wrap/CMakeLists.txt b/wrap/CMakeLists.txt
index 16238950a..6049b8a81 100644
--- a/wrap/CMakeLists.txt
+++ b/wrap/CMakeLists.txt
@@ -30,7 +30,7 @@ endif(GTSAM_BUILD_TESTS)
# toolboxPath : the directory in which to generate the wrappers
# [mexFlags] : extra flags for the mex command
-set(mexFlags "-I${Boost_INCLUDE_DIR} -I${CMAKE_INSTALL_PREFIX}/include -I${CMAKE_INSTALL_PREFIX}/include/gtsam -I${CMAKE_INSTALL_PREFIX}/include/gtsam/base -I${CMAKE_INSTALL_PREFIX}/include/gtsam/geometry -I${CMAKE_INSTALL_PREFIX}/include/gtsam/linear -I${CMAKE_INSTALL_PREFIX}/include/gtsam/nonlinear -I${CMAKE_INSTALL_PREFIX}/include/gtsam/slam -L${CMAKE_INSTALL_PREFIX}/lib -lgtsam")
+set(mexFlags "-I${Boost_INCLUDE_DIR} -I${CMAKE_INSTALL_PREFIX}/include -I${CMAKE_INSTALL_PREFIX}/include/gtsam -I${CMAKE_INSTALL_PREFIX}/include/gtsam/base -I${CMAKE_INSTALL_PREFIX}/include/gtsam/geometry -I${CMAKE_INSTALL_PREFIX}/include/gtsam/linear -I${CMAKE_INSTALL_PREFIX}/include/gtsam/discrete -I${CMAKE_INSTALL_PREFIX}/include/gtsam/inference -I${CMAKE_INSTALL_PREFIX}/include/gtsam/nonlinear -I${CMAKE_INSTALL_PREFIX}/include/gtsam/slam -L${CMAKE_INSTALL_PREFIX}/lib -lgtsam")
set(toolbox_path ${CMAKE_BINARY_DIR}/wrap/gtsam)
set(moduleName gtsam)
@@ -48,20 +48,29 @@ add_custom_target(wrap_gtsam ALL COMMAND
DEPENDS wrap)
# Build command
-# Experimental: requires matlab to be on your path
if (GTSAM_ENABLE_BUILD_MEX_BINARIES)
# Actually compile the mex files when building the library
- set(TOOLBOX_MAKE_FLAGS "-j2")
- add_custom_target(wrap_gtsam_build
- COMMAND make ${TOOLBOX_MAKE_FLAGS}
- WORKING_DIRECTORY ${toolbox_path}
- DEPENDS wrap_gtsam)
+ # TODO: pass correct make flags from parent process
+ message(STATUS "Building Matlab MEX binaries for toolbox with flags ${GTSAM_BUILD_MEX_BINARY_FLAGS}")
+ if (GTSAM_ENABLE_BUILD_MEX_BINARIES_ALL)
+ add_custom_target(wrap_gtsam_build ALL
+ COMMAND make ${GTSAM_BUILD_MEX_BINARY_FLAGS}
+ WORKING_DIRECTORY ${toolbox_path}
+ DEPENDS wrap_gtsam)
+ else()
+ add_custom_target(wrap_gtsam_build
+ COMMAND make ${GTSAM_BUILD_MEX_BINARY_FLAGS}
+ WORKING_DIRECTORY ${toolbox_path}
+ DEPENDS wrap_gtsam)
+ endif()
endif (GTSAM_ENABLE_BUILD_MEX_BINARIES)
set(GTSAM_TOOLBOX_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/borg/toolbox CACHE DOCSTRING "Path to install matlab toolbox")
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
# Primary toolbox files
+ # Note that we copy the entire contents of the folder blindly - this is because
+ # the generated files won't exist at configuration time
message(STATUS "Installing Matlab Toolbox to ${GTSAM_TOOLBOX_INSTALL_PATH}")
install(DIRECTORY DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}) # make an empty folder
# exploit need for trailing slash to specify a full folder, rather than just its contents to copy
@@ -74,9 +83,10 @@ if (GTSAM_INSTALL_MATLAB_TOOLBOX)
install(FILES ${matlab_examples} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/examples)
message(STATUS "Installing Matlab Toolbox Examples (Data)")
- set(data_excludes "${CMAKE_SOURCE_DIR}/examples/Data/.svn")
- file(GLOB matlab_examples_data "${CMAKE_SOURCE_DIR}/examples/Data/*.*")
- list(REMOVE_ITEM matlab_examples_data ${data_excludes})
+ # Data files: *.graph and *.txt
+ file(GLOB matlab_examples_data_graph "${CMAKE_SOURCE_DIR}/examples/Data/*.graph")
+ file(GLOB matlab_examples_data_txt "${CMAKE_SOURCE_DIR}/examples/Data/*.txt")
+ set(matlab_examples_data ${matlab_examples_data_graph} ${matlab_examples_data_txt})
install(FILES ${matlab_examples_data} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/Data)
endif (GTSAM_INSTALL_MATLAB_EXAMPLES)