Skip to content

Commit

Permalink
tf: only include boost if python is enabled.
Browse files Browse the repository at this point in the history
Signed-off-by: furby™ <[email protected]>
  • Loading branch information
furby-tm committed Feb 14, 2025
1 parent f2c29e4 commit 6fe6bad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Sources/Tf/include/Tf/preprocessorUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "Arch/defines.h"
#include "Arch/pragmas.h"

#if __has_include(<boost/preprocessor/arithmetic/inc.hpp>)
#if defined(PXR_PYTHON_SUPPORT_ENABLED) && PXR_PYTHON_SUPPORT_ENABLED && __has_include(<boost/preprocessor/arithmetic/inc.hpp>)
#include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/preprocessor/arithmetic/sub.hpp>
#include <boost/preprocessor/cat.hpp>
Expand All @@ -51,7 +51,7 @@
# include <boost/vmd/is_empty.hpp>
ARCH_PRAGMA_MACRO_TOO_FEW_ARGUMENTS
#endif
#endif // __has_include(<boost/preprocessor/arithmetic/inc.hpp>)
#endif // defined(PXR_PYTHON_SUPPORT_ENABLED) && PXR_PYTHON_SUPPORT_ENABLED && __has_include(<boost/preprocessor/arithmetic/inc.hpp>)

// In boost version 1.51, they seem to have neglected to define this.
// Without it, some functions will get confused about macros with no arguments
Expand Down
4 changes: 2 additions & 2 deletions Sources/Tf/include/Tf/pySignatureExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef PXR_BASE_TF_PY_SIGNATURE_EXT_H
#define PXR_BASE_TF_PY_SIGNATURE_EXT_H

#if __has_include(<boost/mpl/vector.hpp>)
#if defined(PXR_PYTHON_SUPPORT_ENABLED) && PXR_PYTHON_SUPPORT_ENABLED && __has_include(<boost/mpl/vector.hpp>)

#include <boost/mpl/vector.hpp>

Expand Down Expand Up @@ -50,6 +50,6 @@ auto get_signature(Ret (TheCls::*)(Args...) const &, void * = nullptr)

#include <boost/python/signature.hpp>

#endif // __has_include(<boost/mpl/vector.hpp>)
#endif // defined(PXR_PYTHON_SUPPORT_ENABLED) && PXR_PYTHON_SUPPORT_ENABLED && __has_include(<boost/mpl/vector.hpp>)

#endif // PXR_BASE_TF_PY_SIGNATURE_EXT_H
2 changes: 1 addition & 1 deletion Sources/Tf/preprocessorUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//
#include "Tf/preprocessorUtils.h"

#if __has_include(<boost/preprocessor/arithmetic/inc.hpp>)
#if defined(PXR_PYTHON_SUPPORT_ENABLED) && PXR_PYTHON_SUPPORT_ENABLED && __has_include(<boost/preprocessor/arithmetic/inc.hpp>)

# include <boost/preprocessor/arithmetic/sub.hpp>
# include <boost/preprocessor/cat.hpp>
Expand Down

0 comments on commit 6fe6bad

Please sign in to comment.