Merge branch 'upstream-diy' into update-diy
# By Diy Upstream * upstream-diy: diy 2023-06-16 (3ee23f39)
This commit is contained in:
commit
188e5080bd
24
vtkm/thirdparty/diy/vtkmdiy/CMakeLists.txt
vendored
24
vtkm/thirdparty/diy/vtkmdiy/CMakeLists.txt
vendored
@ -121,6 +121,12 @@ endif()
|
|||||||
if (NOT DEFINED diy_export_name)
|
if (NOT DEFINED diy_export_name)
|
||||||
set(diy_export_name "diy_targets")
|
set(diy_export_name "diy_targets")
|
||||||
endif()
|
endif()
|
||||||
|
if (NOT DEFINED diy_development_component)
|
||||||
|
set(diy_development_component "development")
|
||||||
|
endif()
|
||||||
|
if (NOT DEFINED diy_runtime_component)
|
||||||
|
set(diy_runtime_component "runtime")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
|
if (NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
|
||||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
||||||
@ -273,22 +279,26 @@ configure_package_config_file(
|
|||||||
|
|
||||||
# install targets
|
# install targets
|
||||||
if (NOT DEFINED diy_install_only_libraries) # defined by parent project if building for binary distribution
|
if (NOT DEFINED diy_install_only_libraries) # defined by parent project if building for binary distribution
|
||||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/${diy_prefix} DESTINATION ${diy_install_include_dir})
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/${diy_prefix}
|
||||||
|
DESTINATION ${diy_install_include_dir}
|
||||||
|
COMPONENT ${diy_development_component})
|
||||||
|
|
||||||
if (build_diy_mpi_lib)
|
if (build_diy_mpi_lib)
|
||||||
install(FILES ${PROJECT_BINARY_DIR}/include/${diy_prefix}/mpi/mpitypes.hpp DESTINATION ${diy_install_include_dir}/${diy_prefix}/mpi)
|
install(FILES ${PROJECT_BINARY_DIR}/include/${diy_prefix}/mpi/mpitypes.hpp
|
||||||
|
DESTINATION ${diy_install_include_dir}/${diy_prefix}/mpi
|
||||||
|
COMPONENT ${diy_development_component})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS ${diy_targets} EXPORT ${diy_export_name}
|
install(TARGETS ${diy_targets} EXPORT ${diy_export_name}
|
||||||
ARCHIVE DESTINATION ${diy_install_lib_dir}
|
ARCHIVE DESTINATION ${diy_install_lib_dir} COMPONENT ${diy_development_component}
|
||||||
LIBRARY DESTINATION ${diy_install_lib_dir}
|
LIBRARY DESTINATION ${diy_install_lib_dir} COMPONENT ${diy_runtime_component}
|
||||||
RUNTIME DESTINATION ${diy_install_bin_dir})
|
RUNTIME DESTINATION ${diy_install_bin_dir} COMPONENT ${diy_runtime_component})
|
||||||
|
|
||||||
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) # Only generate these files when diy is the main project
|
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) # Only generate these files when diy is the main project
|
||||||
export(EXPORT ${diy_export_name} NAMESPACE DIY:: FILE "${PROJECT_BINARY_DIR}/diy-targets.cmake")
|
export(EXPORT ${diy_export_name} NAMESPACE DIY:: FILE "${PROJECT_BINARY_DIR}/diy-targets.cmake")
|
||||||
install(EXPORT ${diy_export_name} NAMESPACE DIY:: DESTINATION "." FILE diy-targets.cmake)
|
install(EXPORT ${diy_export_name} NAMESPACE DIY:: DESTINATION "." FILE diy-targets.cmake COMPONENT ${diy_development_component})
|
||||||
install(FILES "${PROJECT_BINARY_DIR}/diy-config.cmake" DESTINATION ".")
|
install(FILES "${PROJECT_BINARY_DIR}/diy-config.cmake" DESTINATION "." COMPONENT ${diy_development_component})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (python)
|
if (python)
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
#define VTKMDIY_MPI_NO_MPI_HPP
|
#define VTKMDIY_MPI_NO_MPI_HPP
|
||||||
|
|
||||||
#include <cassert> // std::assert
|
#include <cassert> // std::assert
|
||||||
|
#include <cstdint> // uintptr_t
|
||||||
#include <stdexcept> // std::runtime_error
|
#include <stdexcept> // std::runtime_error
|
||||||
|
|
||||||
|
|
||||||
static const int MPI_SUCCESS = 0;
|
static const int MPI_SUCCESS = 0;
|
||||||
static const int MPI_ANY_SOURCE = -1;
|
static const int MPI_ANY_SOURCE = -1;
|
||||||
static const int MPI_ANY_TAG = -1;
|
static const int MPI_ANY_TAG = -1;
|
||||||
|
@ -69,7 +69,7 @@ namespace diy
|
|||||||
void wipe() { std::vector<char>().swap(buffer); reset(); }
|
void wipe() { std::vector<char>().swap(buffer); reset(); }
|
||||||
void reset() { position = 0; }
|
void reset() { position = 0; }
|
||||||
void skip(size_t s) { position += s; }
|
void skip(size_t s) { position += s; }
|
||||||
void swap(MemoryBuffer& o) { std::swap(position, o.position); buffer.swap(o.buffer); }
|
void swap(MemoryBuffer& o) { std::swap(position, o.position); buffer.swap(o.buffer); std::swap(blob_position, o.blob_position); blobs.swap(o.blobs); }
|
||||||
bool empty() const { return buffer.empty(); }
|
bool empty() const { return buffer.empty(); }
|
||||||
size_t size() const { return buffer.size(); }
|
size_t size() const { return buffer.size(); }
|
||||||
void reserve(size_t s) { buffer.reserve(s); }
|
void reserve(size_t s) { buffer.reserve(s); }
|
||||||
|
Loading…
Reference in New Issue
Block a user