Skip to content

Commit

Permalink
Fix compile error on Clang 18, tweak for better type generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfFan committed Sep 8, 2024
1 parent 30c789d commit e3dd4e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions gtsam/inference/Factor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <boost/serialization/nvp.hpp>
#endif
#include <memory>
#include <algorithm>

#include <gtsam/base/types.h>
#include <gtsam/base/FastVector.h>
Expand Down
4 changes: 2 additions & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ if(GTSAM_UNSTABLE_BUILD_PYTHON)
COMMAND
${CMAKE_COMMAND} -E env
"PYTHONPATH=${GTSAM_PYTHON_BUILD_DIRECTORY}/$ENV{PYTHONPATH}"
pybind11-stubgen -o . --enum-class-locations \"KernelFunctionType|NoiseFormat:gtsam.gtsam\" --enum-class-locations \"OrderingType:gtsam.gtsam.Ordering\" gtsam_unstable
pybind11-stubgen -o . --enum-class-locations \"KernelFunctionType|NoiseFormat:gtsam.gtsam\" --enum-class-locations \"OrderingType:gtsam.gtsam.Ordering\" --numpy-array-use-type-var gtsam_unstable
DEPENDS ${GTSAM_PYTHON_DEPENDENCIES} ${GTSAM_PYTHON_TEST_FILES} ${GTSAM_PYTHON_UNSTABLE_TARGET}
WORKING_DIRECTORY "${GTSAM_PYTHON_BUILD_DIRECTORY}/"
)
Expand All @@ -284,7 +284,7 @@ add_custom_target(
COMMAND
${CMAKE_COMMAND} -E env
"PYTHONPATH=${GTSAM_PYTHON_BUILD_DIRECTORY}/$ENV{PYTHONPATH}"
pybind11-stubgen -o . --enum-class-locations \"KernelFunctionType|NoiseFormat:gtsam.gtsam\" --enum-class-locations \"OrderingType:gtsam.gtsam.Ordering\" gtsam
pybind11-stubgen -o . --enum-class-locations \"KernelFunctionType|NoiseFormat:gtsam.gtsam\" --enum-class-locations \"OrderingType:gtsam.gtsam.Ordering\" --numpy-array-use-type-var gtsam
DEPENDS ${GTSAM_PYTHON_DEPENDENCIES} ${GTSAM_PYTHON_TEST_FILES} ${GTSAM_PYTHON_TARGET}
WORKING_DIRECTORY "${GTSAM_PYTHON_BUILD_DIRECTORY}/"
)
Expand Down
6 changes: 3 additions & 3 deletions python/gtsam/gtsam.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ namespace py = pybind11;
{module_def} {{
m_.doc() = "pybind11 wrapper of {module_name}";
// Specializations for STL classes
#include "python/gtsam/specializations/{module_name}.h"
{submodules_init}

{wrapped_namespace}

// Specializations for STL classes
#include "python/gtsam/specializations/{module_name}.h"

}}

0 comments on commit e3dd4e1

Please sign in to comment.