mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
diy 2023-06-16 (3ee23f39)
Code extracted from: https://gitlab.kitware.com/third-party/diy2.git at commit 3ee23f39193a00e4b601b65bb970d0631eec1662 (for/vtk-m-20230616-g40ea01f9).
This commit is contained in:
parent
928900c63d
commit
12b45d864b
@ -121,6 +121,12 @@ endif()
|
||||
if (NOT DEFINED diy_export_name)
|
||||
set(diy_export_name "diy_targets")
|
||||
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)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
||||
@ -273,22 +279,26 @@ configure_package_config_file(
|
||||
|
||||
# install targets
|
||||
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)
|
||||
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()
|
||||
|
||||
install(TARGETS ${diy_targets} EXPORT ${diy_export_name}
|
||||
ARCHIVE DESTINATION ${diy_install_lib_dir}
|
||||
LIBRARY DESTINATION ${diy_install_lib_dir}
|
||||
RUNTIME DESTINATION ${diy_install_bin_dir})
|
||||
ARCHIVE DESTINATION ${diy_install_lib_dir} COMPONENT ${diy_development_component}
|
||||
LIBRARY DESTINATION ${diy_install_lib_dir} COMPONENT ${diy_runtime_component}
|
||||
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
|
||||
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(FILES "${PROJECT_BINARY_DIR}/diy-config.cmake" DESTINATION ".")
|
||||
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 "." COMPONENT ${diy_development_component})
|
||||
endif()
|
||||
|
||||
if (python)
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define VTKMDIY_MPI_NO_MPI_HPP
|
||||
|
||||
#include <cassert> // std::assert
|
||||
#include <cstdint> // uintptr_t
|
||||
#include <stdexcept> // std::runtime_error
|
||||
|
||||
|
||||
static const int MPI_SUCCESS = 0;
|
||||
static const int MPI_ANY_SOURCE = -1;
|
||||
static const int MPI_ANY_TAG = -1;
|
||||
|
@ -69,7 +69,7 @@ namespace diy
|
||||
void wipe() { std::vector<char>().swap(buffer); reset(); }
|
||||
void reset() { position = 0; }
|
||||
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(); }
|
||||
size_t size() const { return buffer.size(); }
|
||||
void reserve(size_t s) { buffer.reserve(s); }
|
||||
|
Loading…
Reference in New Issue
Block a user