don't compile Gnc when there is no boost

release/4.3a0
kartik arcot 2023-01-23 17:33:42 -08:00 committed by Frank Dellaert
parent 0ab76abe93
commit de2e2899c8
4 changed files with 16 additions and 2 deletions

View File

@ -48,6 +48,13 @@ else()
set(excluded_sources ${excluded_sources} "${CMAKE_CURRENT_SOURCE_DIR}/geometry/Rot3Q.cpp")
endif()
# if GTSAM_USE_BOOST_FEATURES is not set, then we need to exclude the following:
if(NOT GTSAM_USE_BOOST_FEATURES)
list (APPEND excluded_sources ${excluded_sources}
"${CMAKE_CURRENT_SOURCE_DIR}/nonlinear/GncOptimizer.h"
)
endif()
# Common headers
file(GLOB gtsam_core_headers "*.h")
install(FILES ${gtsam_core_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam)

View File

@ -582,6 +582,8 @@ virtual class DoglegOptimizer : gtsam::NonlinearOptimizer {
double getDelta() const;
};
/* Not creating bindings to GncOptimizer since the Chi2Inv currently uses boost */
/*
#include <gtsam/nonlinear/GncOptimizer.h>
template<PARAMS>
virtual class GncOptimizer {
@ -598,6 +600,7 @@ virtual class GncOptimizer {
typedef gtsam::GncOptimizer<gtsam::GncParams<gtsam::GaussNewtonParams>> GncGaussNewtonOptimizer;
typedef gtsam::GncOptimizer<gtsam::GncParams<gtsam::LevenbergMarquardtParams>> GncLMOptimizer;
*/
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
virtual class LevenbergMarquardtOptimizer : gtsam::NonlinearOptimizer {

View File

@ -31,12 +31,12 @@ set (excluded_headers # "")
# if GTSAM_USE_BOOST_FEATURES is not set, then we need to exclude the following:
if(NOT GTSAM_USE_BOOST_FEATURES)
set (excluded_sources ${excluded_sources}
list (APPEND excluded_sources ${excluded_sources}
"${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSParser.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSSolver.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/linear/Scheduler.cpp"
)
set (excluded_headers ${excluded_headers}
list (APPEND excluded_headers ${excluded_headers}
"${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSParser.h"
"${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSSolver.h"
"${CMAKE_CURRENT_SOURCE_DIR}/linear/Scheduler.h"

View File

@ -7,6 +7,10 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") # might not be best test - Richar
list (APPEND tests_exclude "testSerializationSlam.cpp")
endif()
if (NOT GTSAM_USE_BOOST_FEATURES)
list(APPEND tests_exclude "testGncOptimizer.cpp")
endif()
# Build tests
gtsamAddTestsGlob(tests "test*.cpp" "${tests_exclude}" "gtsam")