diff --git a/cmake/GtsamMatlabWrap.cmake b/cmake/GtsamMatlabWrap.cmake index 5d018376b..ba616b025 100644 --- a/cmake/GtsamMatlabWrap.cmake +++ b/cmake/GtsamMatlabWrap.cmake @@ -28,13 +28,13 @@ endif() # finding the LaTeX mex program (totally unrelated to MATLAB Mex) when LaTeX is # on the system path. list(REVERSE matlab_bin_directories) # Reverse list so the highest version (sorted alphabetically) is preferred -find_program(mex_command ${mex_program_name} +find_program(MEX_COMMAND ${mex_program_name} PATHS ${matlab_bin_directories} ENV PATH NO_DEFAULT_PATH) -mark_as_advanced(FORCE mex_command) +mark_as_advanced(FORCE MEX_COMMAND) # Now that we have mex, trace back to find the Matlab installation root -get_filename_component(mex_command "${mex_command}" REALPATH) -get_filename_component(mex_path "${mex_command}" PATH) +get_filename_component(MEX_COMMAND "${MEX_COMMAND}" REALPATH) +get_filename_component(mex_path "${MEX_COMMAND}" PATH) get_filename_component(MATLAB_ROOT "${mex_path}/.." ABSOLUTE) set(MATLAB_ROOT "${MATLAB_ROOT}" CACHE PATH "Path to MATLAB installation root (e.g. /usr/local/MATLAB/R2012a)") diff --git a/gtsam/nonlinear/Values-inl.h b/gtsam/nonlinear/Values-inl.h index 1c96eed64..7b812551e 100644 --- a/gtsam/nonlinear/Values-inl.h +++ b/gtsam/nonlinear/Values-inl.h @@ -33,15 +33,6 @@ namespace gtsam { - /* ************************************************************************* */ - class GTSAM_EXPORT ValueCloneAllocator { - public: - static Value* allocate_clone(const Value& a) { return a.clone_(); } - static void deallocate_clone(const Value* a) { a->deallocate_(); } - private: - ValueCloneAllocator() {} - }; - /* ************************************************************************* */ template struct _ValuesKeyValuePair { diff --git a/gtsam/nonlinear/Values.h b/gtsam/nonlinear/Values.h index e4680c801..811846f79 100644 --- a/gtsam/nonlinear/Values.h +++ b/gtsam/nonlinear/Values.h @@ -52,10 +52,17 @@ namespace gtsam { // Forward declarations / utilities class VectorValues; - class ValueCloneAllocator; class ValueAutomaticCasting; template static bool _truePredicate(const T&) { return true; } + /* ************************************************************************* */ + class GTSAM_EXPORT ValueCloneAllocator { + public: + static Value* allocate_clone(const Value& a) { return a.clone_(); } + static void deallocate_clone(const Value* a) { a->deallocate_(); } + ValueCloneAllocator() {} + }; + /** * A non-templated config holding any types of Manifold-group elements. A * values structure is a map from keys to values. It is used to specify the