mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
vtkmdiy: Support only including the serialization headers of diy
This commit is contained in:
parent
4e1fd2892c
commit
74acc2a7bb
@ -22,6 +22,6 @@
|
|||||||
|
|
||||||
#include <vtkm/cont/TypeString.h>
|
#include <vtkm/cont/TypeString.h>
|
||||||
|
|
||||||
#include <vtkm/thirdparty/diy/diy.h>
|
#include <vtkm/thirdparty/diy/serialization.h>
|
||||||
|
|
||||||
#endif // vtk_m_cont_Serialization_h
|
#endif // vtk_m_cont_Serialization_h
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <vtkm/cont/DynamicCellSet.h>
|
#include <vtkm/cont/DynamicCellSet.h>
|
||||||
#include <vtkm/cont/VariantArrayHandle.h>
|
#include <vtkm/cont/VariantArrayHandle.h>
|
||||||
|
|
||||||
#include <vtkm/thirdparty/diy/diy.h>
|
#include <vtkm/thirdparty/diy/serialization.h>
|
||||||
|
|
||||||
namespace vtkm
|
namespace vtkm
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <vtkm/cont/VariantArrayHandle.h>
|
#include <vtkm/cont/VariantArrayHandle.h>
|
||||||
#include <vtkm/cont/testing/Testing.h>
|
#include <vtkm/cont/testing/Testing.h>
|
||||||
|
|
||||||
#include <vtkm/thirdparty/diy/diy.h>
|
#include <vtkm/thirdparty/diy/serialization.h>
|
||||||
|
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
|
1
vtkm/thirdparty/diy/CMakeLists.txt
vendored
1
vtkm/thirdparty/diy/CMakeLists.txt
vendored
@ -66,5 +66,6 @@ if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
|
|||||||
install(FILES
|
install(FILES
|
||||||
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/Configure.h
|
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/Configure.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/diy.h
|
${CMAKE_CURRENT_SOURCE_DIR}/diy.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/serialization.h
|
||||||
DESTINATION ${VTKm_INSTALL_INCLUDE_DIR}/${kit_dir}/)
|
DESTINATION ${VTKm_INSTALL_INCLUDE_DIR}/${kit_dir}/)
|
||||||
endif()
|
endif()
|
||||||
|
37
vtkm/thirdparty/diy/serialization.h
vendored
Normal file
37
vtkm/thirdparty/diy/serialization.h
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#ifndef vtk_m_thirdparty_diy_serialization_h
|
||||||
|
#define vtk_m_thirdparty_diy_serialization_h
|
||||||
|
|
||||||
|
#include <vtkm/thirdparty/diy/Configure.h>
|
||||||
|
|
||||||
|
#if VTKM_USE_EXTERNAL_DIY
|
||||||
|
#define VTKM_DIY_INCLUDE(header) <diy/header>
|
||||||
|
#else
|
||||||
|
#define VTKM_DIY_INCLUDE(header) <vtkmdiy/include/vtkmdiy/header>
|
||||||
|
#define diy vtkmdiy // mangle namespace diy (see below comments)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||||
|
#include VTKM_DIY_INCLUDE(serialization.hpp)
|
||||||
|
#undef VTKM_DIY_INCLUDE
|
||||||
|
VTKM_THIRDPARTY_POST_INCLUDE
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
// When using an external DIY
|
||||||
|
// We need to alias the diy namespace to
|
||||||
|
// vtkmdiy so that VTK-m uses it properly
|
||||||
|
#if VTKM_USE_EXTERNAL_DIY
|
||||||
|
namespace vtkmdiy = ::diy;
|
||||||
|
|
||||||
|
#else
|
||||||
|
// The aliasing approach fails for when we
|
||||||
|
// want to us an internal version since
|
||||||
|
// the diy namespace already points to the
|
||||||
|
// external version. Instead we use macro
|
||||||
|
// replacement to make sure all diy classes
|
||||||
|
// are placed in vtkmdiy placed
|
||||||
|
#undef diy // mangle namespace diy
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user