Skip to content

Commit

Permalink
Optimize build time by adding Boost definitions in config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Dec 23, 2024
1 parent 3fb1b21 commit 51f3c6d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions gtsam/base/FastSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#pragma once

#include <gtsam/config.h>

#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
#include <boost/version.hpp>
#if BOOST_VERSION >= 107400
Expand Down
5 changes: 4 additions & 1 deletion gtsam/base/serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
* @date Feb 7, 2012
*/

#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
#pragma once

#include <gtsam/config.h>

#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION

#include <Eigen/Core>
#include <fstream>
#include <sstream>
Expand Down
5 changes: 4 additions & 1 deletion gtsam/base/serializationTestHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
* @date Feb 7, 2012
*/

#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
#pragma once

#include <gtsam/config.h>

#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION

#include <iostream>
#include <sstream>
#include <string>
Expand Down
4 changes: 4 additions & 0 deletions gtsam/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@
#cmakedefine GTSAM_SLOW_BUT_CORRECT_BETWEENFACTOR

#cmakedefine GTSAM_SLOW_BUT_CORRECT_EXPMAP

// Boost flags
#cmakedefine01 GTSAM_ENABLE_BOOST_SERIALIZATION
#cmakedefine01 GTSAM_USE_BOOST_FEATURES

0 comments on commit 51f3c6d

Please sign in to comment.