diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100644 index d5fee74..0000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,17 +0,0 @@ -jobs: - - job: 'Linux' - strategy: - matrix: - gcc_7: - image_name: 'ubuntu-20.04' - pool: - vmImage: $(image_name) - timeoutInMinutes: 360 - steps: - - - bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: Add conda to PATH - - - template: unix-build.yml - parameters: - platform: 'Linux' diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml deleted file mode 100644 index d3a90a4..0000000 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ /dev/null @@ -1,26 +0,0 @@ -jobs: - - job: 'OSX' - strategy: - matrix: - macOS_10_15: - image_name: 'macOS-10.15' - pool: - vmImage: $(image_name) - variables: - CC: clang - CXX: clang++ - timeoutInMinutes: 360 - steps: - - script: | - echo "Removing homebrew for Azure to avoid conflicts with conda" - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" - displayName: Remove homebrew - - - bash: | - echo "##vso[task.prependpath]$CONDA/bin" - sudo chown -R $USER $CONDA - displayName: Add conda to PATH - - - template: unix-build.yml - parameters: - platform: 'OSX' diff --git a/.azure-pipelines/unix-build.yml b/.azure-pipelines/unix-build.yml deleted file mode 100644 index 62f41e9..0000000 --- a/.azure-pipelines/unix-build.yml +++ /dev/null @@ -1,46 +0,0 @@ -parameters: - - name: 'platform' - type: string - -steps: - - script: | - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda env create --file environment-dev.yml - displayName: Install dependencies - - - script: | - source activate xtensor-io - conda install gxx_linux-64 libgcc -c conda-forge - condition: eq('${{ parameters.platform }}', 'Linux') - displayName: Install conda-forge compilers - - - script: | - source activate xtensor-io - conda install tbb==2020.2 -c conda-forge - condition: eq('${{ parameters.platform }}', 'OSX') - displayName: Workaround missing TBB - - - script: | - source activate xtensor-io - export LDFLAGS="${LDFLAGS} -Wl,-rpath,$CONDA_PREFIX/lib" - export LINKFLAGS="${LDFLAGS}" - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DHAVE_ALL_DEPS=ON $(Build.SourcesDirectory) - - displayName: Configure xtensor-io - workingDirectory: $(Build.BinariesDirectory) - - - script: | - source activate xtensor-io - python -c 'import struct, zlib; open("files/test.zl", "wb").write(zlib.compress(struct.pack("4d", 3.0, 2.0, 1.0, 0.0), level=1))' - displayName: Generate data for zlib test - workingDirectory: $(Build.BinariesDirectory)/build/test - - - script: | - source activate xtensor-io - export GTEST_FILTER="-xio_gdal_handler.read_vsigs" - make -j2 xtest - displayName: Build and run xtensor-io tests - workingDirectory: $(Build.BinariesDirectory)/build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5a66a84 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,47 @@ +name: CI +on: + workflow_dispatch: + pull_request: + push: + branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} + cancel-in-progress: true +defaults: + run: + shell: bash -e -l {0} +jobs: + unix: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, macos-15] + + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set conda environment + uses: mamba-org/setup-micromamba@main + with: + environment-name: myenv + environment-file: environment-dev.yml + + - name: Configure using CMake + run: cmake -G Ninja -Bbuild -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -DHAVE_ALL_DEPS=ON + + - name: Generate data for zlib test + working-directory: build/test + run: python -c 'import struct, zlib; open("files/test.zl", "wb").write(zlib.compress(struct.pack("4d", 3.0, 2.0, 1.0, 0.0), level=1))' + + - name: Build + working-directory: build + run: cmake --build . --target test_xtensor_io_lib --parallel 8 + + - name: Run tests + working-directory: build/test + run: | + export GTEST_FILTER="-xio_gdal_handler.read_vsigs" + ./test_xtensor_io_lib diff --git a/.readthedocs.yml b/.readthedocs.yml index 02f0e7b..34b504b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,2 +1,13 @@ +version: 2 + +build: + os: ubuntu-24.04 + tools: + python: mambaforge-22.9 + +sphinx: + # Path to Sphinx configuration file + configuration: docs/source/conf.py + conda: - file: docs/environment.yml + environment: docs/environment.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f98e7f..51f610e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ # The full license is in the file LICENSE, distributed with this software. # ############################################################################ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.30) project(xtensor-io) set(XTENSOR_IO_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) @@ -42,7 +42,7 @@ message(STATUS "Building xtensor-io v${${PROJECT_NAME}_VERSION}") # Dependencies # ============ -set (xtensor_REQUIRED_VERSION 0.23.0) +set (xtensor_REQUIRED_VERSION 0.25.0) if(TARGET xtensor) set(xtensor_VERSION ${XTENSOR_VERSION_MAJOR}.${XTENSOR_VERSION_MINOR}.${XTENSOR_VERSION_PATCH}) if( NOT ${xtensor_VERSION} VERSION_GREATER_EQUAL ${xtensor_REQUIRED_VERSION}) @@ -121,6 +121,7 @@ endforeach() set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/modules") add_library(xtensor-io INTERFACE) +target_compile_features(xtensor-io INTERFACE cxx_std_17) include_directories(${GTEST_INCLUDE_DIRS}) @@ -187,18 +188,8 @@ endif() if(HAVE_HighFive) find_package(HighFive REQUIRED) - find_package(HDF5 REQUIRED) - message(STATUS "HighFive ${HighFive_VERSION} and HDF5 ${HDF5_VERSION} found, HDF5 file support enabled") - find_package(HDF5 REQUIRED) - get_target_property(HighFive_INCLUDE_DIRECTORIES_EXTRACTED HighFive INTERFACE_INCLUDE_DIRECTORIES) - target_include_directories(xtensor-io - INTERFACE - ${HighFive_INCLUDE_DIRECTORIES_EXTRACTED} - ) - target_link_libraries(xtensor-io - INTERFACE - ${HDF5_LIBRARIES} - ) + message(STATUS "HighFive ${HighFive_VERSION} found, HDF5 file support enabled") + target_link_libraries(xtensor-io INTERFACE HighFive::HighFive) else() message(STATUS "HighFive not enabled: use -DHAVE_HighFive=ON for HDF5 file support") endif() @@ -235,15 +226,11 @@ else() endif() if(HAVE_storage_client) - find_package(storage_client REQUIRED) - message(STATUS "storage_client ${storage_client_VERSION} found, Google Cloud Storage IO handler support enabled") - target_include_directories(xtensor-io - INTERFACE - ${storage_client_INCLUDE_DIRS} - ) + find_package(google_cloud_cpp_storage REQUIRED) + message(STATUS "google_cloud_cpp_storage ${google_cloud_cpp_storage_VERSION} found, Google Cloud Storage IO handler support enabled") target_link_libraries(xtensor-io INTERFACE - storage_client + google-cloud-cpp::storage ) else() message(STATUS "storage_client not enabled: use -DHAVE_storage_client=ON for Google Cloud Storage IO handler support") diff --git a/README.md b/README.md index 42103ff..8f0862e 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,7 @@ Reading and writing image, sound and npz file formats to and from xtensor data s ```bash mamba install xtensor-io -c conda-forge ``` - -- `xtensor-io` depends on `xtensor` `^0.23.0`. +- `xtensor-io` depends on `xtensor` `^0.26.0 - `OpenImageIO`, `libsndfile`, `zlib`, `HighFive`, and `blosc` are optional dependencies to `xtensor-io` diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 34b4156..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,7 +0,0 @@ -trigger: - - master - -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml - diff --git a/environment-dev.yml b/environment-dev.yml index 4ca927a..174db06 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -4,16 +4,16 @@ channels: dependencies: # Build dependencies - cmake + - ninja # Host dependencies - - openimageio=2.2.7 - - libsndfile=1.0.30 - - zlib=1.2.11 - - highfive=2.1.1 - - blosc - - gdal + - openimageio >=3.1,<4 + - fmt >=12.2,<13 + - libsndfile >=1.2,<2 + - zlib >=1.3,<2 + - highfive >=3.3,<4 + - blosc >=1.21,<2 + - gdal >=3.13,<4 - nlohmann_json - - google-cloud-cpp=1.21.0 - - aws-sdk-cpp - - xtensor=0.23.10 - - cpp-filesystem - + - google-cloud-cpp >=3.0,<4 + - aws-sdk-cpp >=1.11,<2 + - xtensor=0.27.1 diff --git a/environment.yml b/environment.yml index f7e12ea..6a26b2f 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: xtensor-io channels: - conda-forge dependencies: - - xtensor-io=0.12.9 + - xtensor-io=0.13.0 - xeus-cling=0.12.1 - xwidgets=0.25.1 - ffmpeg=4.3.1 diff --git a/include/xtensor-io/xaudio.hpp b/include/xtensor-io/xaudio.hpp index 29b8b20..4ee7fd0 100644 --- a/include/xtensor-io/xaudio.hpp +++ b/include/xtensor-io/xaudio.hpp @@ -15,9 +15,9 @@ #include -#include -#include -#include +#include +#include +#include #include "xtensor_io_config.hpp" diff --git a/include/xtensor-io/xchunk_store_manager.hpp b/include/xtensor-io/xchunk_store_manager.hpp index f4d04d1..eb47e5f 100644 --- a/include/xtensor-io/xchunk_store_manager.hpp +++ b/include/xtensor-io/xchunk_store_manager.hpp @@ -4,12 +4,12 @@ #include #include -#include "ghc/filesystem.hpp" +#include #include -#include "xtensor/xarray.hpp" -#include "xtensor/xchunked_array.hpp" +#include "xtensor/containers/xarray.hpp" +#include "xtensor/chunk/xchunked_array.hpp" #include "xfile_array.hpp" namespace xt @@ -671,7 +671,7 @@ namespace xt template inline std::string xchunk_store_manager::get_temporary_directory() const { - namespace fs = ghc::filesystem; + namespace fs = std::filesystem; fs::path tmp_dir = fs::temp_directory_path(); std::size_t count = 0; while(fs::exists(tmp_dir / std::to_string(count))) @@ -684,7 +684,7 @@ namespace xt template inline void xchunk_store_manager::reset_to_directory(const std::string& directory) { - namespace fs = ghc::filesystem; + namespace fs = std::filesystem; fs::remove_all(get_directory()); fs::rename(directory, get_directory()); m_unload_index = 0u; diff --git a/include/xtensor-io/xfile_array.hpp b/include/xtensor-io/xfile_array.hpp index 1860f8b..2b7e749 100644 --- a/include/xtensor-io/xfile_array.hpp +++ b/include/xtensor-io/xfile_array.hpp @@ -7,8 +7,8 @@ #include -#include -#include +#include +#include namespace xt { diff --git a/include/xtensor-io/xgdal.hpp b/include/xtensor-io/xgdal.hpp index 26cecb6..dfc8e8a 100644 --- a/include/xtensor-io/xgdal.hpp +++ b/include/xtensor-io/xgdal.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include "xtensor-io.hpp" // We rely exclusively on the stable C interface to GDAL. diff --git a/include/xtensor-io/xhighfive.hpp b/include/xtensor-io/xhighfive.hpp index b5c06c6..32b71b7 100644 --- a/include/xtensor-io/xhighfive.hpp +++ b/include/xtensor-io/xhighfive.hpp @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #include "xtensor-io.hpp" diff --git a/include/xtensor-io/ximage.hpp b/include/xtensor-io/ximage.hpp index 6701471..ca753a9 100644 --- a/include/xtensor-io/ximage.hpp +++ b/include/xtensor-io/ximage.hpp @@ -15,9 +15,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "xtensor_io_config.hpp" @@ -62,7 +62,7 @@ namespace xt static_cast(spec.width), static_cast(spec.nchannels)}); - in->read_image(OIIO::BaseTypeFromC::value, image.data()); + in->read_image(0, 0, 0, spec.nchannels, OIIO::BaseTypeFromC::value, image.data()); in->close(); diff --git a/include/xtensor-io/xio_aws_handler.hpp b/include/xtensor-io/xio_aws_handler.hpp index 576e79b..7351a28 100644 --- a/include/xtensor-io/xio_aws_handler.hpp +++ b/include/xtensor-io/xio_aws_handler.hpp @@ -1,8 +1,8 @@ #ifndef XTENSOR_IO_AWS_HANDLER_HPP #define XTENSOR_IO_AWS_HANDLER_HPP -#include -#include +#include +#include #include #include #include diff --git a/include/xtensor-io/xio_binary.hpp b/include/xtensor-io/xio_binary.hpp index 7a6f953..89a7b95 100644 --- a/include/xtensor-io/xio_binary.hpp +++ b/include/xtensor-io/xio_binary.hpp @@ -12,7 +12,7 @@ #include -#include "xtensor/xadapt.hpp" +#include "xtensor/containers/xadapt.hpp" #include "xtensor-io.hpp" #include "xfile_array.hpp" #include "xio_stream_wrapper.hpp" diff --git a/include/xtensor-io/xio_blosc.hpp b/include/xtensor-io/xio_blosc.hpp index 2b4ff0a..5da893b 100644 --- a/include/xtensor-io/xio_blosc.hpp +++ b/include/xtensor-io/xio_blosc.hpp @@ -12,7 +12,7 @@ #include -#include "xtensor/xadapt.hpp" +#include "xtensor/containers/xadapt.hpp" #include "xtensor-io.hpp" #include "xfile_array.hpp" #include "blosc.h" diff --git a/include/xtensor-io/xio_disk_handler.hpp b/include/xtensor-io/xio_disk_handler.hpp index 891eeb7..c3f43c4 100644 --- a/include/xtensor-io/xio_disk_handler.hpp +++ b/include/xtensor-io/xio_disk_handler.hpp @@ -1,13 +1,13 @@ #ifndef XTENSOR_IO_DISK_HANDLER_HPP #define XTENSOR_IO_DISK_HANDLER_HPP -#include -#include -#include +#include +#include +#include #include "xio_stream_wrapper.hpp" #include "xfile_array.hpp" -namespace fs = ghc::filesystem; +namespace fs = std::filesystem; namespace xt { @@ -62,7 +62,7 @@ namespace xt { if (!fs::is_directory(directory)) { - XTENSOR_THROW(std::runtime_error, "Path is not a directory: " + std::string(directory)); + XTENSOR_THROW(std::runtime_error, "Path is not a directory: " + std::string(directory.string())); } } else diff --git a/include/xtensor-io/xio_gcs_handler.hpp b/include/xtensor-io/xio_gcs_handler.hpp index d31e3e6..96463b8 100644 --- a/include/xtensor-io/xio_gcs_handler.hpp +++ b/include/xtensor-io/xio_gcs_handler.hpp @@ -1,9 +1,10 @@ #ifndef XTENSOR_IO_GCS_HANDLER_HPP #define XTENSOR_IO_GCS_HANDLER_HPP -#include -#include +#include +#include #include +#include #include "xfile_array.hpp" #include "xio_stream_wrapper.hpp" @@ -43,7 +44,7 @@ namespace xt template xio_gcs_handler::xio_gcs_handler() - : m_client(gcs::ClientOptions((gcs::oauth2::CreateAnonymousCredentials()))) + : m_client(google::cloud::Options{}.set(google::cloud::MakeInsecureCredentials())) { } diff --git a/include/xtensor-io/xio_gdal_handler.hpp b/include/xtensor-io/xio_gdal_handler.hpp index 3af17b1..76cf2f9 100644 --- a/include/xtensor-io/xio_gdal_handler.hpp +++ b/include/xtensor-io/xio_gdal_handler.hpp @@ -1,8 +1,8 @@ #ifndef XTENSOR_IO_GDAL_HANDLER_HPP #define XTENSOR_IO_GDAL_HANDLER_HPP -#include -#include +#include +#include #include "xfile_array.hpp" #include "xio_vsilfile_wrapper.hpp" diff --git a/include/xtensor-io/xio_gzip.hpp b/include/xtensor-io/xio_gzip.hpp index 9d17dbd..6e8cbc0 100644 --- a/include/xtensor-io/xio_gzip.hpp +++ b/include/xtensor-io/xio_gzip.hpp @@ -14,7 +14,7 @@ #include "zlib.h" -#include "xtensor/xadapt.hpp" +#include "xtensor/containers/xadapt.hpp" #include "xtensor-io.hpp" #include "xfile_array.hpp" #include "xio_stream_wrapper.hpp" diff --git a/include/xtensor-io/xio_zlib.hpp b/include/xtensor-io/xio_zlib.hpp index 217618f..533a9b9 100644 --- a/include/xtensor-io/xio_zlib.hpp +++ b/include/xtensor-io/xio_zlib.hpp @@ -14,7 +14,7 @@ #include "zlib.h" -#include "xtensor/xadapt.hpp" +#include "xtensor/containers/xadapt.hpp" #include "xtensor-io.hpp" #include "xfile_array.hpp" #include "xio_stream_wrapper.hpp" diff --git a/include/xtensor-io/xnpz.hpp b/include/xtensor-io/xnpz.hpp index 2cfd866..34f1cf6 100644 --- a/include/xtensor-io/xnpz.hpp +++ b/include/xtensor-io/xnpz.hpp @@ -27,7 +27,7 @@ #include "thirdparty/zstr/zstr.hpp" -#include +#include #include "xtensor_io_config.hpp" @@ -303,8 +303,11 @@ namespace xt } else { - stream.seekg(static_cast(entry.compressed_size), - std::ios_base::cur); + auto compressed_size = extract_zip64_compressed_size(stream, entry); + if (!stream.seekg(std::streamoff(compressed_size), std::ios_base::cur)) + { + throw std::runtime_error("load_npz: unable to skip the next variable."); + } } } throw std::runtime_error("Array "s + search_varname + " not found in file: "s + filename); diff --git a/include/xtensor-io/xtensor_io_config.hpp.in b/include/xtensor-io/xtensor_io_config.hpp.in index fc67481..1a337c7 100644 --- a/include/xtensor-io/xtensor_io_config.hpp.in +++ b/include/xtensor-io/xtensor_io_config.hpp.in @@ -11,8 +11,8 @@ #define XTENSOR_IO_CONFIG_HPP #define XTENSOR_IO_VERSION_MAJOR 0 -#define XTENSOR_IO_VERSION_MINOR 12 -#define XTENSOR_IO_VERSION_PATCH 9 +#define XTENSOR_IO_VERSION_MINOR 15 +#define XTENSOR_IO_VERSION_PATCH 0 #pragma cling add_library_path(@XTENSOR_IO_CLING_LIBRARY_DIR_64@) #pragma cling add_library_path(@XTENSOR_IO_CLING_LIBRARY_DIR_32@) diff --git a/modules/FindBlosc.cmake b/modules/FindBlosc.cmake index 40bfa62..25bd8df 100644 --- a/modules/FindBlosc.cmake +++ b/modules/FindBlosc.cmake @@ -71,7 +71,7 @@ may be provided to tell this module where to look. #]=======================================================================] -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.30) include(GNUInstallDirs) # Monitoring _ROOT variables diff --git a/modules/FindSndFile.cmake b/modules/FindSndFile.cmake index 2158f66..6eee02e 100644 --- a/modules/FindSndFile.cmake +++ b/modules/FindSndFile.cmake @@ -36,4 +36,4 @@ endif(LIBSNDFILE_FOUND) mark_as_advanced(LIBSNDFILE_LIBRARY LIBSNDFILE_LIBRARIES LIBSNDFILE_INCLUDE_DIR LIBSNDFILE_INCLUDE_DIRS) -unset(_LIBSNDFILE_HINTS) \ No newline at end of file +unset(_LIBSNDFILE_HINTS) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 45f3769..d86ef0a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,7 +7,7 @@ # The full license is in the file LICENSE, distributed with this software. # ############################################################################ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.30) if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) project(xtensor-io-test) @@ -25,12 +25,12 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wunused-parameter -Wextra -Wreorder -Wconversion -Wsign-conversion") - CHECK_CXX_COMPILER_FLAG("-std=c++14" HAS_CPP14_FLAG) + CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG) - if (HAS_CPP14_FLAG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + if (HAS_CPP17_FLAG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") else() - message(FATAL_ERROR "Unsupported compiler -- xtensor requires C++14 support!") + message(FATAL_ERROR "Unsupported compiler -- xtensor requires C++17 support!") endif() endif() diff --git a/test/downloadGTest.cmake.in b/test/downloadGTest.cmake.in index bbfc16c..d73d516 100644 --- a/test/downloadGTest.cmake.in +++ b/test/downloadGTest.cmake.in @@ -7,14 +7,16 @@ # The full license is in the file LICENSE, distributed with this software. # ############################################################################ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.30) project(googletest-download NONE) include(ExternalProject) ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/JohanMabille/googletest.git - GIT_TAG warnings + #GIT_REPOSITORY https://github.com/JohanMabille/googletest.git + GIT_REPOSITORY https://github.com/google/googletest.git + #GIT_TAG warnings + GIT_TAG v1.15.2 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" CONFIGURE_COMMAND "" diff --git a/test/test_xaudio.cpp b/test/test_xaudio.cpp index 94c56d3..5fd1d5c 100644 --- a/test/test_xaudio.cpp +++ b/test/test_xaudio.cpp @@ -9,7 +9,7 @@ #include "gtest/gtest.h" #include "xtensor-io/xaudio.hpp" -#include "xtensor/xio.hpp" +#include "xtensor/io/xio.hpp" namespace xt { diff --git a/test/test_xchunk_store_manager.cpp b/test/test_xchunk_store_manager.cpp index 50cccb2..a2cdbf8 100644 --- a/test/test_xchunk_store_manager.cpp +++ b/test/test_xchunk_store_manager.cpp @@ -9,7 +9,7 @@ #include "gtest/gtest.h" -#include +#include #include "xtensor-io/xchunk_store_manager.hpp" #include "xtensor-io/xfile_array.hpp" #include @@ -17,7 +17,7 @@ namespace xt { - namespace fs = ghc::filesystem; + namespace fs = std::filesystem; template inline auto make_test_chunked_array(const S& shape, diff --git a/test/test_xfile_array.cpp b/test/test_xfile_array.cpp index 23268bc..edab327 100644 --- a/test/test_xfile_array.cpp +++ b/test/test_xfile_array.cpp @@ -9,9 +9,9 @@ #include "gtest/gtest.h" -#include +#include #include "xtensor-io/xfile_array.hpp" -#include +#include "xtensor-io/xio_binary.hpp" #include "xtensor-io/xio_disk_handler.hpp" namespace xt diff --git a/test/test_xgdal.cpp b/test/test_xgdal.cpp index da4d5e7..e677899 100644 --- a/test/test_xgdal.cpp +++ b/test/test_xgdal.cpp @@ -1,7 +1,7 @@ #include "gtest/gtest.h" #include "xtensor-io/xgdal.hpp" -#include "xtensor/xadapt.hpp" -#include "xtensor/xoperation.hpp" +#include "xtensor/containers/xadapt.hpp" +#include "xtensor/core/xoperation.hpp" #include diff --git a/test/test_xhighfive.cpp b/test/test_xhighfive.cpp index 2680866..057eefe 100644 --- a/test/test_xhighfive.cpp +++ b/test/test_xhighfive.cpp @@ -12,7 +12,7 @@ #include #include "gtest/gtest.h" -#include "xtensor/xrandom.hpp" +#include "xtensor/generators/xrandom.hpp" #include "xtensor-io/xhighfive.hpp" namespace xt diff --git a/test/test_ximage.cpp b/test/test_ximage.cpp index 5974647..29137b4 100644 --- a/test/test_ximage.cpp +++ b/test/test_ximage.cpp @@ -8,9 +8,9 @@ ****************************************************************************/ #include "gtest/gtest.h" -#include "xtensor/xoperation.hpp" -#include "xtensor/xview.hpp" -#include "xtensor/xio.hpp" +#include "xtensor/core/xoperation.hpp" +#include "xtensor/views/xview.hpp" +#include "xtensor/io/xio.hpp" #include "xtensor-io/ximage.hpp" diff --git a/test/test_xio_gcs_handler.cpp b/test/test_xio_gcs_handler.cpp index f3565e1..b5b54e7 100644 --- a/test/test_xio_gcs_handler.cpp +++ b/test/test_xio_gcs_handler.cpp @@ -12,6 +12,7 @@ #include #include "gtest/gtest.h" +#include #include "xtensor-io/xio_gzip.hpp" #include "xtensor-io/xio_gcs_handler.hpp" @@ -20,7 +21,10 @@ namespace xt TEST(xio_gcs_handler, read) { xio_gcs_handler h; - xio_gcs_config c = {gcs::Client((gcs::ClientOptions(gcs::oauth2::CreateAnonymousCredentials()))), "zarr-demo"}; + xio_gcs_config c = {gcs::Client(google::cloud::Options{}.set( + google::cloud::MakeInsecureCredentials())), + "zarr-demo"}; + h.configure_io(c); xarray a0; h.read(a0, "v3/test.zr3/data/root/arthur/dent/c0/0"); diff --git a/xtensor-ioConfig.cmake.in b/xtensor-ioConfig.cmake.in index 41c422c..d24887e 100644 --- a/xtensor-ioConfig.cmake.in +++ b/xtensor-ioConfig.cmake.in @@ -19,11 +19,6 @@ include(CMakeFindDependencyMacro) find_dependency(xtensor @xtensor_REQUIRED_VERSION@) -set(PN xtensor_io) -set_and_check(${PN}_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") -set(${PN}_LIBRARY "") -check_required_components(${PN}) - if(NOT TARGET @PROJECT_NAME@) include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") endif()