Commit 2ff6576c authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Add third party wrappers around boost macros.

The boost assert macros seem to have an issue where they define an
unused typedef. This is causing the XCode 7 compiler to issue a warning.
Since the offending code is in a macro, the warning is identified with
the VTK-m header even though the code is in boost. To get around this,
wrap all uses of the boost assert that is causing the warning in the
third party pre/post macros to disable the warning.
parent 27c4f474
......@@ -75,9 +75,11 @@ struct CellShapeTagCheck : boost::false_type { };
/// tag.
///
#define VTKM_IS_CELL_SHAPE_TAG(tag) \
VTKM_THIRDPARTY_PRE_INCLUDE \
BOOST_STATIC_ASSERT_MSG( \
::vtkm::internal::CellShapeTagCheck<tag>::value, \
"Provided type is not a valid VTK-m cell shape tag.")
"Provided type is not a valid VTK-m cell shape tag.") \
VTKM_THIRDPARTY_POST_INCLUDE
/// A traits-like class to get an CellShapeId known at compile time to a tag.
///
......
......@@ -48,9 +48,11 @@ struct ListTagCheck
/// code when a mistake is made.)
///
#define VTKM_IS_LIST_TAG(tag) \
VTKM_THIRDPARTY_PRE_INCLUDE \
BOOST_STATIC_ASSERT_MSG( \
::vtkm::internal::ListTagCheck<tag>::Valid, \
"Provided type is not a valid VTK-m list tag.")
"Provided type is not a valid VTK-m list tag.") \
VTKM_THIRDPARTY_POST_INCLUDE
namespace detail {
......
......@@ -95,7 +95,9 @@ struct CellSetCheck
};
#define VTKM_IS_CELL_SET(T) \
BOOST_STATIC_ASSERT(::vtkm::cont::internal::CellSetCheck<T>::type::value)
VTKM_THIRDPARTY_PRE_INCLUDE \
BOOST_STATIC_ASSERT(::vtkm::cont::internal::CellSetCheck<T>::type::value) \
VTKM_THIRDPARTY_POST_INCLUDE
} // namespace internal
......
......@@ -62,9 +62,11 @@ struct ControlSignatureTagCheck
/// get weird errors elsewhere in the code when a mistake is made.)
///
#define VTKM_IS_CONTROL_SIGNATURE_TAG(tag) \
VTKM_THIRDPARTY_PRE_INCLUDE \
BOOST_STATIC_ASSERT_MSG( \
::vtkm::cont::arg::internal::ControlSignatureTagCheck<tag>::Valid, \
"Provided a type that is not a valid ControlSignature tag.")
"Provided a type that is not a valid ControlSignature tag.") \
VTKM_THIRDPARTY_POST_INCLUDE
}
}
......
......@@ -86,9 +86,11 @@ struct DeviceAdapterTagCheck
/// elsewhere in the code when a mistake is made.)
///
#define VTKM_IS_DEVICE_ADAPTER_TAG(tag) \
VTKM_THIRDPARTY_PRE_INCLUDE \
BOOST_STATIC_ASSERT_MSG( \
::vtkm::cont::internal::DeviceAdapterTagCheck<tag>::Valid, \
"Provided type is not a valid VTK-m device adapter tag.")
"Provided type is not a valid VTK-m device adapter tag.") \
VTKM_THIRDPARTY_POST_INCLUDE
//-----------------------------------------------------------------------------
#if VTKM_DEVICE_ADAPTER == VTKM_DEVICE_ADAPTER_SERIAL
......
......@@ -64,9 +64,11 @@ struct ExecutionSignatureTagCheck
/// get weird errors elsewhere in the code when a mistake is made.)
///
#define VTKM_IS_EXECUTION_SIGNATURE_TAG(tag) \
VTKM_THIRDPARTY_PRE_INCLUDE \
BOOST_STATIC_ASSERT_MSG( \
::vtkm::exec::arg::internal::ExecutionSignatureTagCheck<tag>::Valid, \
"Provided a type that is not a valid ExecutionSignature tag.")
"Provided a type that is not a valid ExecutionSignature tag.") \
VTKM_THIRDPARTY_POST_INCLUDE
}
}
......
......@@ -76,7 +76,9 @@ void GetMinMaxPoints(CellShapeTag,
{
// If this line fails, then MAX_POINTS is not large enough to support all
// cell shapes.
VTKM_THIRDPARTY_PRE_INCLUDE
BOOST_STATIC_ASSERT((vtkm::CellTraits<CellShapeTag>::NUM_POINTS <= MAX_POINTS));
VTKM_THIRDPARTY_POST_INCLUDE
minPoints = maxPoints = vtkm::CellTraits<CellShapeTag>::NUM_POINTS;
}
......
......@@ -45,7 +45,9 @@ void GetMinMaxPoints(CellShapeTag,
{
// If this line fails, then MAX_POINTS is not large enough to support all
// cell shapes.
VTKM_THIRDPARTY_PRE_INCLUDE
BOOST_STATIC_ASSERT((vtkm::CellTraits<CellShapeTag>::NUM_POINTS <= MAX_POINTS));
VTKM_THIRDPARTY_POST_INCLUDE
minPoints = maxPoints = vtkm::CellTraits<CellShapeTag>::NUM_POINTS;
}
......
......@@ -48,7 +48,9 @@ void GetMinMaxPoints(CellShapeTag,
{
// If this line fails, then MAX_POINTS is not large enough to support all
// cell shapes.
VTKM_THIRDPARTY_PRE_INCLUDE
BOOST_STATIC_ASSERT((vtkm::CellTraits<CellShapeTag>::NUM_POINTS <= MAX_POINTS));
VTKM_THIRDPARTY_POST_INCLUDE
minPoints = maxPoints = vtkm::CellTraits<CellShapeTag>::NUM_POINTS;
}
......
......@@ -264,10 +264,12 @@ private:
const vtkm::internal::FunctionInterface<Signature> &parameters) const
{
typedef vtkm::internal::FunctionInterface<Signature> ParameterInterface;
VTKM_THIRDPARTY_PRE_INCLUDE
BOOST_STATIC_ASSERT_MSG(ParameterInterface::ARITY == NUM_INVOKE_PARAMS,
"Dispatcher Invoke called with wrong number of arguments.");
BOOST_MPL_ASSERT(( boost::is_base_of<BaseWorkletType,WorkletType> ));
VTKM_THIRDPARTY_POST_INCLUDE
// As we do the dynamic transform, we are also going to check the static
// type against the TypeCheckTag in the ControlSignature tags. To do this,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment