fix: add GTSAM_USE_BOOST_FEATURES to definitions - #1995
Conversation
|
Thanks, but I might not fully understand then: I checked and we don't do this for GTSAM_ENABLE_BOOST_SERIALIZATION, but we can still branch on that in code. Why is GTSAM_USE_BOOST_FEATURES different? |
Oh, right. The |
|
Well, I guess my question was the other way :-) Why can we branch on GTSAM_ENABLE_BOOST_SERIALIZATION currently? And could we use the same mechanism to branch on GTSAM_USE_BOOST_FEATURES? It seems the |
|
right :-) |
|
Note, your test is compile time. All macro pre-processing is gone at runtime. |
|
OK, got it. GTSAM is using https://github.com/borglab/gtsam/blob/develop/gtsam/config.h.in |
a5170c0 to
c344e6e
Compare
dellaert
left a comment
There was a problem hiding this comment.
Ah ! Nice, LGTM :-) I will kick off CI and we can merge.




This fixes the issue #1994 and some issues mentioned in #1967 and #1981.
The change defines the proper identifier if
GTSAM_USE_BOOST_FEATURESoption is set in CMakeLists.txt.It's used in:
gtsam/gtsam/base/concepts.h
Lines 11 to 24 in 7b56d66
...and without it the compiler throws
BOOST_CONCEPT_USAGEredefinition error.