diff --git a/.github/workflows/ax.yml b/.github/workflows/ax.yml index 083bf70d53..0b8c99463f 100644 --- a/.github/workflows/ax.yml +++ b/.github/workflows/ax.yml @@ -43,6 +43,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +defaults: + run: + shell: bash + jobs: linux-ax: if: | @@ -63,7 +67,7 @@ jobs: config: - { image: '2023-clang15', cxx: 'clang++', build: 'Release', cmake: '' } - { image: '2023-clang15', cxx: 'g++', build: 'Release', cmake: '' } - - { image: '2022-clang11', cxx: 'clang++', build: 'Debug', cmake: '' } + - { image: '2023-clang15', cxx: 'clang++', build: 'Debug', cmake: '' } - { image: '2022-clang11', cxx: 'clang++', build: 'Release', cmake: '' } - { image: '2022-clang11', cxx: 'g++', build: 'Release', cmake: '' } - { image: '2021-clang10', cxx: 'clang++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' } @@ -76,13 +80,12 @@ jobs: run: ./ci/install_pybind11.sh 2.10.0 - name: timestamp id: timestamp - shell: bash - run: echo "::set-output name=timestamp::`date -u +'%Y-%m-%dT%H:%M:%SZ'`" + run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT - name: ccache # don't use ccache for debug builds if: matrix.config.build == 'Release' id: ccache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/ccache key: linux-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }} @@ -105,7 +108,6 @@ jobs: # Keep ccache light by stripping out any caches not accessed in the last day - name: ccache_clean if: matrix.config.build == 'Release' - shell: bash run: ccache --evict-older-than 1d macos-ax: @@ -121,14 +123,14 @@ jobs: matrix: config: #@note llvm10 never got its own brew formula... - - { runner: 'macos-11', cxx: 'clang++', build: 'Release', llvm: '11' } - - { runner: 'macos-11', cxx: 'clang++', build: 'Release', llvm: '12' } - - { runner: 'macos-11', cxx: 'clang++', build: 'Release', llvm: '13' } + - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '11' } + - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '12' } + - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '13' } fail-fast: false steps: - uses: actions/checkout@v3 - name: install_deps - run: ./ci/install_macos_ax.sh ${{ matrix.config.llvm }} + run: ./ci/install_macos.sh ${{ matrix.config.llvm }} - name: build run: > ./ci/build.sh -v diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c468c6b4d2..c9b36595c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,15 +77,13 @@ jobs: # @note we specifically use clang15.0 (not clang15) here as the newest # versions of the clang15.X containers have some issues with the GLFW # installation - - { cxx: clang++, image: '2023-clang15.0', abi: '10', build: 'Release', cmake: '' } - - { cxx: g++, image: '2023-clang15.0', abi: '10', build: 'Release', cmake: '' } + - { cxx: clang++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' } + - { cxx: g++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' } + - { cxx: clang++, image: '2022-clang11', abi: '11', build: 'Debug', cmake: '' } - { cxx: clang++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' } - - { cxx: clang++, image: '2022-clang11', abi: '10', build: 'Debug' , cmake: '' } - { cxx: g++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' } - - { cxx: clang++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '' } - - { cxx: g++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '' } - - { cxx: clang++, image: '2021', abi: '8', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' } - - { cxx: g++, image: '2021', abi: '8', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' } + - { cxx: clang++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' } + - { cxx: g++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' } fail-fast: false steps: - uses: actions/checkout@v3 @@ -94,12 +92,12 @@ jobs: run: ./ci/install_pybind11.sh 2.10.0 - name: timestamp id: timestamp - run: echo "::set-output name=timestamp::`date -u +'%Y-%m-%dT%H:%M:%SZ'`" + run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT - name: ccache # don't use ccache for debug builds if: matrix.config.build == 'Release' id: ccache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/ccache key: linux-vfx${{ matrix.config.image }}-abi${{ matrix.config.abi }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }} @@ -188,24 +186,17 @@ jobs: github.event_name != 'workflow_dispatch' || github.event.inputs.type == 'all' || github.event.inputs.type == 'mac' - runs-on: macos-11 + runs-on: macos-latest env: CXX: clang++ steps: - uses: actions/checkout@v3 - name: install - # brew boost-python3 installs a "Keg-only" version of python which is - # not installed to PATH. We must manually provide the location of the - # required python installation to CMake through a hint variable which - # is exported in install_macos.sh run: ./ci/install_macos.sh - name: build - # Also need to disable compiler warnings for ABI 6 and above due to - # the version of clang installed run: > ./ci/build.sh -v --build-type=Release --components=\"core,python,bin,view,render,test\" - --cargs=\"-DOPENVDB_CXX_STRICT=OFF -DOPENVDB_ABI_VERSION_NUMBER=10 -DOPENVDB_SIMD=SSE42\" - name: test run: cd build && ctest -V diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 24a63e5dc3..d3febe0d76 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -105,13 +105,11 @@ jobs: github.event.inputs.deploy == 'coverage' runs-on: ubuntu-latest container: - image: aswf/ci-openvdb:2022 + image: aswf/ci-openvdb:2023 env: CXX: g++ steps: - uses: actions/checkout@v3 - - name: install_gtest - run: ./ci/install_gtest.sh 1.10.0 - name: install_gcovr run: pip install gcovr - name: build diff --git a/.github/workflows/houdini.yml b/.github/workflows/houdini.yml index 43fb6ed441..3f6b539ece 100644 --- a/.github/workflows/houdini.yml +++ b/.github/workflows/houdini.yml @@ -36,6 +36,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +defaults: + run: + shell: bash + jobs: checksecret: # Check that valid github secrets have been set. This isn't needed to retrieve @@ -49,7 +53,7 @@ jobs: env: HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }} HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }} - run: echo "::set-output name=HOUDINI_SECRETS::${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" + run: echo "HOUDINI_SECRETS=${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" >> $GITHUB_OUTPUT - name: Skip Next Jobs if: steps.check.outputs.HOUDINI_SECRETS != 'true' run: echo "HOUDINI_CLIENT_ID and HOUDINI_SECRET_KEY GitHub Action Secrets needs to be set to install Houdini builds" @@ -69,11 +73,10 @@ jobs: strategy: matrix: config: - - { cxx: clang++, image: '2021', hou: '19_5', j: '8', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest', disable_checks: 'OFF' } - # Houdini 19 is technically on VFX 2020, but we need 2021 dependencies for VDB 10 - - { cxx: clang++, image: '2021', hou: '19_0', j: '8', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest', disable_checks: 'ON' } - - { cxx: clang++, image: '2021', hou: '19_5', j: '8', build: 'Debug', components: 'core,hou', disable_checks: 'OFF' } - - { cxx: g++, image: '2021', hou: '19_5', j: '8', build: 'Release', components: 'core,hou', disable_checks: 'OFF' } + #- { cxx: clang++, image: '2022', hou: '20_0', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' } + - { cxx: clang++, image: '2021', hou: '19_5', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' } + #- { cxx: clang++, image: '2022', hou: '20_0', build: 'Debug', components: 'core,hou' } + #- { cxx: g++, image: '2022', hou: '20_0', build: 'Release', components: 'core,hou' } fail-fast: false steps: - uses: actions/checkout@v3 @@ -82,19 +85,18 @@ jobs: run: ./ci/install_pybind11.sh 2.10.0 - name: timestamp id: timestamp - shell: bash - run: echo "::set-output name=timestamp::`date -u +'%Y-%m-%dT%H:%M:%SZ'`" + run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT - name: ccache # don't use ccache for debug builds if: matrix.config.build == 'Release' id: ccache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/ccache key: linux-vfx-hou${{ matrix.config.hou }}-${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }} restore-keys: linux-vfx-hou${{ matrix.config.hou }}-${{ matrix.config.image }}-${{ matrix.config.cxx }}- - name: fetch_houdini - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: hou key: dummy-houdini${{ matrix.config.hou }}-${{ steps.timestamp.outputs.timestamp }} @@ -110,7 +112,6 @@ jobs: cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd - - name: build - shell: bash run: | export HFS="$HOME/houdini_install/hou" export HDSO="${HFS}/dsolib" @@ -121,7 +122,6 @@ jobs: # Keep ccache light by stripping out any caches not accessed in the last day - name: ccache_clean if: matrix.config.build == 'Release' - shell: bash run: ccache --evict-older-than 1d # Delete the houdini tarball so that this dummy cache occupies no space - name: delete_hou diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 2644e45a14..c7e9a8333f 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -42,7 +42,7 @@ jobs: env: HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }} HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }} - run: echo "::set-output name=HOUDINI_SECRETS::${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" + run: echo "HOUDINI_SECRETS=${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" >> $GITHUB_OUTPUT - name: Skip Next Jobs if: steps.check.outputs.HOUDINI_SECRETS != 'true' run: echo "HOUDINI_CLIENT_ID and HOUDINI_SECRET_KEY GitHub Action Secrets needs to be set to install Houdini builds" @@ -67,8 +67,8 @@ jobs: strategy: matrix: config: - - { houdini_version: '19.0', houdini_version_str: '19_0' } - { houdini_version: '19.5', houdini_version_str: '19_5' } + #- { houdini_version: '20.0', houdini_version_str: '20_0' } fail-fast: false container: image: aswf/ci-base:2023 @@ -76,7 +76,7 @@ jobs: - uses: actions/checkout@v3 - name: timestamp id: timestamp - run: echo "::set-output name=timestamp::`date -u +'%Y-%m-%dT%H:%M:%SZ'`" + run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT - name: download_houdini run: ./ci/download_houdini.sh ${{ matrix.config.houdini_version }} ON - name: install_houdini @@ -85,7 +85,7 @@ jobs: cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd - - name: write_houdini_cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: hou key: vdb-v5-houdini${{ matrix.config.houdini_version_str }}-${{ steps.timestamp.outputs.timestamp }} @@ -104,7 +104,7 @@ jobs: runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }} name: linux-extra:${{ matrix.config.name }} container: - image: aswf/ci-openvdb:2022-clang14 + image: aswf/ci-openvdb:2023-clang15 env: CXX: clang++ strategy: @@ -158,8 +158,7 @@ jobs: if [ "$RUNNER_OS" == "Linux" ]; then sudo apt-get -q install -y libboost-dev libboost-iostreams-dev libtbb-dev libblosc-dev llvm-dev libgtest-dev libcppunit-dev pybind11-dev elif [ "$RUNNER_OS" == "macOS" ]; then - ./ci/install_macos_ax.sh 15 - brew install googletest + ./ci/install_macos.sh 15 else echo "$RUNNER_OS not supported"; exit 1 fi @@ -243,7 +242,7 @@ jobs: github.event_name != 'workflow_dispatch' || github.event.inputs.type == 'all' || github.event.inputs.type == 'ax' - runs-on: macos-11 + runs-on: macos-latest name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }} env: CXX: ${{ matrix.config.cxx }} @@ -257,7 +256,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: install_deps - run: ./ci/install_macos_ax.sh ${{ matrix.config.llvm }} + run: ./ci/install_macos.sh ${{ matrix.config.llvm }} - name: build run: > ./ci/build.sh -v diff --git a/CHANGES b/CHANGES index de6d6a0763..7fd5c5b343 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,13 @@ OpenVDB Version History ======================= +Version 11.0.0 - In Progress + + This version introduces ABI changes relative to older major releases, + so to preserve ABI compatibility it might be necessary to define the + macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 9 for + Houdini 19.5 and 10 for Houdini 20.0. + Version 10.1.0 - October 11, 2023 Highlights: @@ -118,6 +125,11 @@ Version 10.0.1 - November 30, 2022 Version 10.0.0 - October 27, 2022 + This version introduces ABI changes relative to older major releases, + so to preserve ABI compatibility it might be necessary to define the + macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 8 for + Houdini 19.0 and 9 for Houdini 19.5. + Highlights: - Introducing OpenVDBLink, which provides a Mathematica interface to OpenVDB. This link ports over access to various grid containers including diff --git a/CMakeLists.txt b/CMakeLists.txt index ba033ea643..8329dda947 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,8 @@ endif() ###### Version -set(OpenVDB_MAJOR_VERSION 10) -set(OpenVDB_MINOR_VERSION 1) +set(OpenVDB_MAJOR_VERSION 11) +set(OpenVDB_MINOR_VERSION 0) set(OpenVDB_PATCH_VERSION 0) set(OpenVDB_VERSION "${OpenVDB_MAJOR_VERSION}.${OpenVDB_MINOR_VERSION}.${OpenVDB_PATCH_VERSION}") @@ -89,8 +89,8 @@ cmake_dependent_option(OPENVDB_INSTALL_CMAKE_MODULES option(USE_HOUDINI [=[ Build the library against a Houdini installation. Turns on automatically if OPENVDB_BUILD_HOUDINI_PLUGIN is enabled. -When enabled, you do not need to provide dependency locations for TBB, Blosc, IlmBase and OpenEXR. Boost must be -provided. IlmBase/OpenEXR can optionally be provided if Houdini Version >= 17.5.]=] OFF) +When enabled, you do not need to provide dependency locations for TBB, Blosc, Imath and OpenEXR. Boost must be +provided. Imath/OpenEXR can optionally be provided.]=] OFF) option(USE_MAYA [=[ Build the library against a Maya installation. Turns on automatically if OPENVDB_BUILD_MAYA_PLUGIN is enabled. When enabled, you do not need to provide dependency locations for TBB. All other dependencies must be provided.]=] OFF) @@ -281,13 +281,11 @@ enable_testing() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") # Add cmake modules to installation command -# @todo fix our glew cmake module if(OPENVDB_INSTALL_CMAKE_MODULES) set(OPENVDB_CMAKE_MODULES cmake/FindBlosc.cmake cmake/FindJemalloc.cmake - cmake/FindIlmBase.cmake cmake/FindLog4cplus.cmake cmake/FindOpenEXR.cmake cmake/FindOpenVDB.cmake @@ -406,7 +404,6 @@ endif() if(USE_STATIC_DEPENDENCIES) set(BLOSC_USE_STATIC_LIBS ON) set(OPENEXR_USE_STATIC_LIBS ON) - set(ILMBASE_USE_STATIC_LIBS ON) set(TBB_USE_STATIC_LIBS ON) set(LOG4CPLUS_USE_STATIC_LIBS ON) set(JEMALLOC_USE_STATIC_LIBS ON) diff --git a/README.md b/README.md index 33e524ad8d..b70edb4064 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,74 @@ -![OpenVDB](https://www.openvdb.org/images/openvdb_logo.png) +![OpenVDB](doc/img/banner.png) -[![License](https://img.shields.io/github/license/AcademySoftwareFoundation/openvdb)](LICENSE) -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2774/badge)](https://bestpractices.coreinfrastructure.org/projects/2774) -[![Slack](https://slack.aswf.io/badge.svg)](https://slack.aswf.io/) +| OpenVDB | AX | Nano | Houdini | License | CII | +| :----: | :----: | :----: | :----: | :-----: | :-: | +| [![core](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml) | [![ax](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml) | [![nano](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml) | [![hou](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml) | [![License](https://img.shields.io/github/license/AcademySoftwareFoundation/openvdb)](LICENSE) | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2774/badge)](https://bestpractices.coreinfrastructure.org/projects/2774) | - -| OpenVDB | AX | Nano | Houdini | -| :----: | :----: | :----: | :----: | -| [![core](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml) | [![ax](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml) | [![nano](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml) | [![hou](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml) | +------------------------------------------------------------------------------- [Website](https://www.openvdb.org) | [Discussion Forum](https://github.com/AcademySoftwareFoundation/openvdb/discussions) | -[Documentation](https://www.openvdb.org/documentation/doxygen) - -OpenVDB is an open source C++ library comprising a novel hierarchical data structure and a large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. It was developed by DreamWorks Animation for use in volumetric applications typically encountered in feature film production. +[Documentation](https://www.openvdb.org/documentation/doxygen) | +[Releases](https://github.com/AcademySoftwareFoundation/openvdb/releases) | +[License](https://www.mozilla.org/MPL/2.0) | +[Slack](https://slack.aswf.io/) +OpenVDB is an open source C++ library comprising a novel hierarchical data +structure and a large suite of tools for the efficient storage and manipulation +of sparse volumetric data discretized on three-dimensional grids. It was +developed by DreamWorks Animation for use in volumetric applications typically +encountered in feature film production. ### Development Repository -This GitHub repository hosts the trunk of the OpenVDB development. This implies that it is the newest public version with the latest features and bug fixes. However, it also means that it has not undergone a lot of testing and is generally less stable than the [production releases](https://github.com/AcademySoftwareFoundation/openvdb/releases). - +This GitHub repository hosts the trunk of the OpenVDB development. This implies +that it is the newest public version with the latest features and bug fixes. +However, it also means that it has not undergone a lot of testing and is +generally less stable than the [production releases](https://github.com/AcademySoftwareFoundation/openvdb/releases). ### License -OpenVDB is released under the [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/), which is a free, open source software license developed and maintained by the Mozilla Foundation. +OpenVDB is released under the [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/), +which is a free, open source software license developed and maintained by the +Mozilla Foundation. -The trademarks of any contributor to this project may not be used in association with the project without the contributor's express permission. +The trademarks of any contributor to this project may not be used in +association with the project without the contributor's express permission. ### Contributing -OpenVDB welcomes contributions to the OpenVDB project. Please refer to the [contribution guidelines](CONTRIBUTING.md) for details on how to make a contribution. +OpenVDB welcomes contributions to the OpenVDB project. Please refer to the +[contribution guidelines](CONTRIBUTING.md) for details on how to make a +contribution. + +------------------------------------------------------------------------------- ### Developer Quick Start -The following provides basic installation examples for the core OpenVDB library. Other components, such as the python module, OpenVDB AX, NanoVDB and various executables, may require additional dependencies. See the [build documentation](https://www.openvdb.org/documentation/doxygen/build.html) for help with installations. +The following provides basic installation examples for the core OpenVDB library. +Other components, such as the python module, OpenVDB AX, NanoVDB and various +executables, may require additional dependencies. See the +[build documentation](https://www.openvdb.org/documentation/doxygen/build.html) +for help with installations. -#### Linux -##### Installing Dependencies (Boost, TBB, Blosc) +##### Linux/MacOS ```bash +# Linux # @note If your distribution does not have required versions, consider using # apt pinning. See the dependency documentation for more details. apt-get install -y libboost-iostreams-dev apt-get install -y libtbb-dev apt-get install -y libblosc-dev -``` -##### Building OpenVDB -```bash -git clone git@github.com:AcademySoftwareFoundation/openvdb.git -cd openvdb -mkdir build -cd build -cmake .. -make -j4 && make install -``` -#### macOS -##### Installing Dependencies (Boost, TBB, Blosc) -```bash +# MacOS +# @note We are using homebrew in this example to install requried dependencies +# https://brew.sh/ brew install boost brew install tbb brew install c-blosc ``` -##### Building OpenVDB + ```bash git clone git@github.com:AcademySoftwareFoundation/openvdb.git cd openvdb @@ -71,14 +77,16 @@ cd build cmake .. make -j4 && make install ``` -#### Windows -##### Installing Dependencies (Boost, TBB, Blosc) + +##### Windows Note that the following commands have only been tested for 64bit systems/libraries. It is recommended to set the `VCPKG_DEFAULT_TRIPLET` environment variable to `x64-windows` to use 64-bit libraries by default. You will also require -[Git](https://git-scm.com/downloads), [vcpkg](https://github.com/microsoft/vcpkg) -and [CMake](https://cmake.org/download/) to be installed. +[Visual Studio](https://visualstudio.microsoft.com/downloads/) (for the MSVC C++ +runtime and compiler toolchains), [CMake](https://cmake.org/download/) and optionally +[vcpkg](https://github.com/microsoft/vcpkg) for the installation of OpenVDB's +dependencies. ```bash vcpkg install zlib:x64-windows @@ -87,10 +95,9 @@ vcpkg install tbb:x64-windows vcpkg install boost-iostreams:x64-windows vcpkg install boost-any:x64-windows vcpkg install boost-algorithm:x64-windows -vcpkg install boost-uuid:x64-windows vcpkg install boost-interprocess:x64-windows ``` -##### Building OpenVDB + ```bash git clone git@github.com:AcademySoftwareFoundation/openvdb.git cd openvdb @@ -100,42 +107,19 @@ cmake -DCMAKE_TOOLCHAIN_FILE=\scripts\buildsystems\vcpkg.cmake -D cmake --build . --parallel 4 --config Release --target install ``` -#### Building OpenVDB AX +#### Building OpenVDB AX and NanoVDB -OpenVDB AX depends on the core OpenVDB library. See the [build documentation](https://www.openvdb.org/documentation/doxygen/build.html) for all available AX component options: +OpenVDB AX depends on the core OpenVDB library. NanoVDB can be built with and +without OpenVDB support. Note that NanoVDB has its own build instructuins, see +the [NanoVDB build documentation](https://www.openvdb.org/documentation/doxygen/NanoVDB_HowToBuild.html) +for details. -```bash -git clone git@github.com:AcademySoftwareFoundation/openvdb.git -cd openvdb -mkdir build -cd build -cmake -DOPENVDB_BUILD_AX=ON .. -make -j4 && make install -``` - -#### Building NanoVDB +The following variables can be passed to the `cmake` configure command. There +are more optional VDB components, see the [build documentation](https://www.openvdb.org/documentation/doxygen/build.html) +for a complete list. -NanoVDB can be built with and without OpenVDB support. To see full build instructions -see the [NanoVDB build documentation](https://www.openvdb.org/documentation/doxygen/NanoVDB_HowToBuild.html) - -#### Building Without OpenVDB Support - -```bash -git clone git@github.com:AcademySoftwareFoundation/openvdb.git -cd openvdb/nanovdb/nanovdb # Build from the subdirectory -mkdir build -cd build -cmake .. -make -j4 && make install -``` - -#### Building With OpenVDB Support - -```bash -git clone git@github.com:AcademySoftwareFoundation/openvdb.git -cd openvdb -mkdir build -cd build -cmake -DOPENVDB_BUILD_NANOVDB=ON .. -make -j4 && make install -``` +| Option | Details | +| :---- | :----- | +| `-D OPENVDB_BUILD_AX=ON` | to enable OpenVDB AX | +| `-D OPENVDB_BUILD_NANOVDB=ON` | to enable NanoVDB | +| `-D NANOVDB_USE_OPENVDB=ON` | to use OpenVDB in NanoVDB | diff --git a/ci/build.sh b/ci/build.sh index 68bb493903..7e35797a14 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -176,8 +176,8 @@ set -x # - always enabled the python tests with OPENVDB_BUILD_PYTHON_UNITTESTS if the python module is in use, # regardless of the 'test' component being enabled or not (see the OPENVDB_BUILD_PYTHON_UNITTESTS option). cmake \ - -DOPENVDB_USE_DEPRECATED_ABI_8=ON \ -DOPENVDB_USE_DEPRECATED_ABI_9=ON \ + -DOPENVDB_USE_DEPRECATED_ABI_10=ON \ -DOPENVDB_BUILD_VDB_PRINT=ON \ -DOPENVDB_BUILD_VDB_LOD=ON \ -DOPENVDB_BUILD_VDB_TOOL=ON \ diff --git a/ci/install_cmake.sh b/ci/install_cmake.sh deleted file mode 100755 index 9fc6607b6e..0000000000 --- a/ci/install_cmake.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -CMAKE_VERSION="$1" -CMAKE_PACKAGE=cmake-${CMAKE_VERSION}-Linux-x86_64 - -wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_PACKAGE}.tar.gz - -tar -xf ${CMAKE_PACKAGE}.tar.gz -cp ${CMAKE_PACKAGE}/bin/* /usr/local/bin/ -cp -r ${CMAKE_PACKAGE}/share/* /usr/local/share/ - -rm -rf ${CMAKE_PACKAGE} -rm -rf ${CMAKE_PACKAGE}.tar.gz diff --git a/ci/install_gtest.sh b/ci/install_gtest.sh deleted file mode 100755 index d9059b2a7e..0000000000 --- a/ci/install_gtest.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -GTEST_VERSION="$1" - -git clone https://github.com/google/googletest.git -cd googletest - -if [ "$GTEST_VERSION" != "latest" ]; then - git checkout release-${GTEST_VERSION} -b v${GTEST_VERSION} -fi - -mkdir build -cd build -cmake ../. -make -j8 -make install diff --git a/ci/install_macos.sh b/ci/install_macos.sh index 77d5bfd55b..20a2d6f4ad 100755 --- a/ci/install_macos.sh +++ b/ci/install_macos.sh @@ -3,27 +3,17 @@ set -x brew update - -if [ ! -z $2 ]; then - if [[ $2 == "gcc"* || $2 == "llvm"* ]]; then - brew install $2 - else - # don't silently succeed - echo "Unknown compiler type/version for second argument to install_macos.sh: $2" - exit -1 - fi -fi - brew install bash gnu-getopt # for CI scripts -brew install cmake brew install boost -brew install pybind11 # also installs the dependent python version -brew install zlib +brew install c-blosc +brew install cmake brew install glfw brew install googletest -brew install c-blosc brew install jq # for trivial parsing of brew json +brew install openexr +brew install pybind11 # also installs the dependent python version brew install tbb +brew install zlib # Alias python version installed by pybind11 to path py_version=$(brew info pybind11 --json | \ @@ -36,15 +26,13 @@ echo "/usr/local/opt/$py_version/bin" >> $GITHUB_PATH # use gnu-getopt echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH -LATEST=$1 -if [ "$LATEST" == "latest" ]; then - brew install openexr -else - brew install ilmbase - brew install openexr@2 - - # Export OpenEXR paths which are no longer installed to /usr/local (as v2.x is deprecated) - echo "IlmBase_ROOT=/usr/local/opt/ilmbase" >> $GITHUB_ENV - echo "OpenEXR_ROOT=/usr/local/opt/openexr@2" >> $GITHUB_ENV - echo "/usr/local/opt/openexr@2/bin" >> $GITHUB_PATH +LLVM_VERSION=$1 +if [ ! -z "$LLVM_VERSION" ]; then + if [ "$LLVM_VERSION" == "latest" ]; then + brew install llvm + brew install cppunit + else + brew install llvm@$LLVM_VERSION + brew install cppunit + fi fi diff --git a/ci/install_macos_ax.sh b/ci/install_macos_ax.sh deleted file mode 100755 index 00c41b466d..0000000000 --- a/ci/install_macos_ax.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -# Download and install deps from homebrew on macos - -brew update -brew install bash gnu-getopt # for CI scripts -brew install cmake -brew install boost -brew install pybind11 # also installs the dependent python version -brew install cppunit -brew install c-blosc -brew install zlib -brew install jq # for trivial parsing of brew json -brew install tbb - -# Alias python version installed by pybind11 to path -py_version=$(brew info pybind11 --json | \ - jq -cr '.[].dependencies[] | select(. | startswith("python"))') -echo "Using python $py_version" -# export for subsequent action steps (note, not exported for this env) -echo "Python_ROOT_DIR=/usr/local/opt/$py_version" >> $GITHUB_ENV -echo "/usr/local/opt/$py_version/bin" >> $GITHUB_PATH - -# use gnu-getopt -echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH - -LLVM_VERSION=$1 -if [ "$LLVM_VERSION" == "latest" ]; then - brew install llvm -else - brew install llvm@$LLVM_VERSION -fi diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake deleted file mode 100644 index 8237ac76ea..0000000000 --- a/cmake/FindIlmBase.cmake +++ /dev/null @@ -1,447 +0,0 @@ -# Copyright Contributors to the OpenVDB Project -# SPDX-License-Identifier: MPL-2.0 -# -#[=======================================================================[.rst: - -FindIlmBase ------------ - -Find IlmBase include dirs and libraries - -Use this module by invoking find_package with the form:: - - find_package(IlmBase - [version] [EXACT] # Minimum or EXACT version - [REQUIRED] # Fail with error if IlmBase is not found - [COMPONENTS ...] # IlmBase libraries by their canonical name - # e.g. "Half" for "libHalf" - ) - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -``IlmBase::Half`` - The Half library target. -``IlmBase::Iex`` - The Iex library target. -``IlmBase::IexMath`` - The IexMath library target. -``IlmBase::IlmThread`` - The IlmThread library target. -``IlmBase::Imath`` - The Imath library target. - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``IlmBase_FOUND`` - True if the system has the IlmBase library. -``IlmBase_VERSION`` - The version of the IlmBase library which was found. -``IlmBase_INCLUDE_DIRS`` - Include directories needed to use IlmBase. -``IlmBase_RELEASE_LIBRARIES`` - Libraries needed to link to the release version of IlmBase. -``IlmBase_RELEASE_LIBRARY_DIRS`` - IlmBase release library directories. -``IlmBase_DEBUG_LIBRARIES`` - Libraries needed to link to the debug version of IlmBase. -``IlmBase_DEBUG_LIBRARY_DIRS`` - IlmBase debug library directories. -``IlmBase_{COMPONENT}_FOUND`` - True if the system has the named IlmBase component. - -Deprecated - use [RELEASE|DEBUG] variants: - -``IlmBase_LIBRARIES`` - Libraries needed to link to IlmBase. -``IlmBase_LIBRARY_DIRS`` - IlmBase library directories. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``IlmBase_INCLUDE_DIR`` - The directory containing ``IlmBase/config-auto.h``. -``IlmBase_{COMPONENT}_LIBRARY`` - Individual component libraries for IlmBase. may include target_link_libraries() debug/optimized keywords. -``IlmBase_{COMPONENT}_LIBRARY_RELEASE`` - Individual component libraries for IlmBase release -``IlmBase_{COMPONENT}_LIBRARY_DEBUG`` - Individual component libraries for IlmBase debug - -Hints -^^^^^ - -Instead of explicitly setting the cache variables, the following variables -may be provided to tell this module where to look. - -``IlmBase_ROOT`` - Preferred installation prefix. -``ILMBASE_INCLUDEDIR`` - Preferred include directory e.g. /include -``ILMBASE_LIBRARYDIR`` - Preferred library directory e.g. /lib -``ILMBASE_DEBUG_SUFFIX`` - Suffix of the debug version of ilmbase libs. Defaults to "_d". -``SYSTEM_LIBRARY_PATHS`` - Global list of library paths intended to be searched by and find_xxx call -``ILMBASE_USE_STATIC_LIBS`` - Only search for static ilmbase libraries -``DISABLE_CMAKE_SEARCH_PATHS`` - Disable CMakes default search paths for find_xxx calls in this module - -#]=======================================================================] - -cmake_minimum_required(VERSION 3.18) -include(GNUInstallDirs) - - -mark_as_advanced( - IlmBase_INCLUDE_DIR - IlmBase_LIBRARY -) - -set(_FIND_ILMBASE_ADDITIONAL_OPTIONS "") -if(DISABLE_CMAKE_SEARCH_PATHS) - set(_FIND_ILMBASE_ADDITIONAL_OPTIONS NO_DEFAULT_PATH) -endif() - -set(_ILMBASE_COMPONENT_LIST - Half - Iex - IexMath - IlmThread - Imath -) - -if(IlmBase_FIND_COMPONENTS) - set(ILMBASE_COMPONENTS_PROVIDED TRUE) - set(_IGNORED_COMPONENTS "") - foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) - if(NOT ${COMPONENT} IN_LIST _ILMBASE_COMPONENT_LIST) - list(APPEND _IGNORED_COMPONENTS ${COMPONENT}) - endif() - endforeach() - - if(_IGNORED_COMPONENTS) - message(STATUS "Ignoring unknown components of IlmBase:") - foreach(COMPONENT ${_IGNORED_COMPONENTS}) - message(STATUS " ${COMPONENT}") - endforeach() - list(REMOVE_ITEM IlmBase_FIND_COMPONENTS ${_IGNORED_COMPONENTS}) - endif() -else() - set(ILMBASE_COMPONENTS_PROVIDED FALSE) - set(IlmBase_FIND_COMPONENTS ${_ILMBASE_COMPONENT_LIST}) -endif() - -# Set _ILMBASE_ROOT based on a user provided root var. Xxx_ROOT and ENV{Xxx_ROOT} -# are prioritised over the legacy capitalized XXX_ROOT variables for matching -# CMake 3.12 behaviour -# @todo deprecate -D and ENV ILMBASE_ROOT from CMake 3.12 -if(IlmBase_ROOT) - set(_ILMBASE_ROOT ${IlmBase_ROOT}) -elseif(DEFINED ENV{IlmBase_ROOT}) - set(_ILMBASE_ROOT $ENV{IlmBase_ROOT}) -elseif(ILMBASE_ROOT) - set(_ILMBASE_ROOT ${ILMBASE_ROOT}) -elseif(DEFINED ENV{ILMBASE_ROOT}) - set(_ILMBASE_ROOT $ENV{ILMBASE_ROOT}) -endif() - -# Additionally try and use pkconfig to find IlmBase -if(USE_PKGCONFIG) - if(NOT DEFINED PKG_CONFIG_FOUND) - find_package(PkgConfig) - endif() - if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_IlmBase QUIET ilmbase) - endif() -endif() - -# ------------------------------------------------------------------------ -# Search for IlmBase include DIR -# ------------------------------------------------------------------------ - -set(_ILMBASE_INCLUDE_SEARCH_DIRS "") -list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS - ${ILMBASE_INCLUDEDIR} - ${_ILMBASE_ROOT} - ${PC_IlmBase_INCLUDEDIR} - ${SYSTEM_LIBRARY_PATHS} -) - -# Look for a standard IlmBase header file. -find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h - ${_FIND_ILMBASE_ADDITIONAL_OPTIONS} - PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS} - PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR}/OpenEXR include/OpenEXR OpenEXR -) - -if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h") - # Get the ILMBASE version information from the config header - file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" - _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR " - ) - string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" - _ilmbase_version_major_string "${_ilmbase_version_major_string}" - ) - string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR) - - file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" - _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR " - ) - string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" - _ilmbase_version_minor_string "${_ilmbase_version_minor_string}" - ) - string(STRIP "${_ilmbase_version_minor_string}" IlmBase_VERSION_MINOR) - - unset(_ilmbase_version_major_string) - unset(_ilmbase_version_minor_string) - - set(IlmBase_VERSION ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR}) -endif() - -# ------------------------------------------------------------------------ -# Search for ILMBASE lib DIR -# ------------------------------------------------------------------------ - -if(NOT DEFINED ILMBASE_DEBUG_SUFFIX) - set(ILMBASE_DEBUG_SUFFIX _d) -endif() - -set(_ILMBASE_LIBRARYDIR_SEARCH_DIRS "") - -# Append to _ILMBASE_LIBRARYDIR_SEARCH_DIRS in priority order - -list(APPEND _ILMBASE_LIBRARYDIR_SEARCH_DIRS - ${ILMBASE_LIBRARYDIR} - ${_ILMBASE_ROOT} - ${PC_IlmBase_LIBDIR} - ${SYSTEM_LIBRARY_PATHS} -) - -set(IlmBase_LIB_COMPONENTS "") -list(APPEND ILM_BUILD_TYPES RELEASE DEBUG) - -foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) - foreach(BUILD_TYPE ${ILM_BUILD_TYPES}) - - set(_TMP_SUFFIX "") - if(BUILD_TYPE STREQUAL DEBUG) - set(_TMP_SUFFIX ${ILMBASE_DEBUG_SUFFIX}) - endif() - - set(_IlmBase_Version_Suffix "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}") - set(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - - if(WIN32) - if(ILMBASE_USE_STATIC_LIBS) - set(CMAKE_FIND_LIBRARY_SUFFIXES "${_TMP_SUFFIX}.lib") - endif() - list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.lib") - else() - if(ILMBASE_USE_STATIC_LIBS) - set(CMAKE_FIND_LIBRARY_SUFFIXES "${_TMP_SUFFIX}.a") - else() - if(APPLE) - list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.dylib") - else() - list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.so") - endif() - endif() - list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.a") - endif() - - # Find the lib - find_library(IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${COMPONENT} - ${_FIND_ILMBASE_ADDITIONAL_OPTIONS} - PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS} - PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib - ) - - if(EXISTS ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}}) - list(APPEND IlmBase_LIB_COMPONENTS ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}}) - list(APPEND IlmBase_LIB_COMPONENTS_${BUILD_TYPE} ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}}) - endif() - - # Reset library suffix - set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) - unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) - unset(_IlmBase_Version_Suffix) - unset(_TMP_SUFFIX) - endforeach() - - if(IlmBase_${COMPONENT}_LIBRARY_DEBUG AND IlmBase_${COMPONENT}_LIBRARY_RELEASE) - # if the generator is multi-config or if CMAKE_BUILD_TYPE is set for - # single-config generators, set optimized and debug libraries - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig OR CMAKE_BUILD_TYPE) - set(IlmBase_${COMPONENT}_LIBRARY optimized ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} debug ${IlmBase_${COMPONENT}_LIBRARY_DEBUG}) - else() - # For single-config generators where CMAKE_BUILD_TYPE has no value, - # just use the release libraries - set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE}) - endif() - # FIXME: This probably should be set for both cases - set(IlmBase_${COMPONENT}_LIBRARIES optimized ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} debug ${IlmBase_${COMPONENT}_LIBRARY_DEBUG}) - endif() - - # if only the release version was found, set the debug variable also to the release version - if(IlmBase_${COMPONENT}_LIBRARY_RELEASE AND NOT IlmBase_${COMPONENT}_LIBRARY_DEBUG) - set(IlmBase_${COMPONENT}_LIBRARY_DEBUG ${IlmBase_${COMPONENT}_LIBRARY_RELEASE}) - set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE}) - set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_RELEASE}) - endif() - - # if only the debug version was found, set the release variable also to the debug version - if(IlmBase_${COMPONENT}_LIBRARY_DEBUG AND NOT IlmBase_${COMPONENT}_LIBRARY_RELEASE) - set(IlmBase_${COMPONENT}_LIBRARY_RELEASE ${IlmBase_${COMPONENT}_LIBRARY_DEBUG}) - set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_DEBUG}) - set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_DEBUG}) - endif() - - # If the debug & release library ends up being the same, omit the keywords - if("${IlmBase_${COMPONENT}_LIBRARY_RELEASE}" STREQUAL "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}") - set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} ) - set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} ) - endif() - - if(IlmBase_${COMPONENT}_LIBRARY) - set(IlmBase_${COMPONENT}_FOUND TRUE) - else() - set(IlmBase_${COMPONENT}_FOUND FALSE) - endif() -endforeach() - -# ------------------------------------------------------------------------ -# Cache and set ILMBASE_FOUND -# ------------------------------------------------------------------------ - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(IlmBase - FOUND_VAR IlmBase_FOUND - REQUIRED_VARS - IlmBase_INCLUDE_DIR - IlmBase_LIB_COMPONENTS - VERSION_VAR IlmBase_VERSION - HANDLE_COMPONENTS -) - -if(NOT IlmBase_FOUND) - if(IlmBase_FIND_REQUIRED) - message(FATAL_ERROR "Unable to find IlmBase") - endif() - return() -endif() - -# Partition release/debug lib vars - -set(IlmBase_RELEASE_LIBRARIES "") -set(IlmBase_RELEASE_LIBRARY_DIRS "") -set(IlmBase_DEBUG_LIBRARIES "") -set(IlmBase_DEBUG_LIBRARY_DIRS "") -foreach(LIB ${IlmBase_LIB_COMPONENTS_RELEASE}) - get_filename_component(_ILM_LIBDIR ${LIB} DIRECTORY) - list(APPEND IlmBase_RELEASE_LIBRARIES ${LIB}) - list(APPEND IlmBase_RELEASE_LIBRARY_DIRS ${_ILM_LIBDIR}) -endforeach() - -foreach(LIB ${IlmBase_LIB_COMPONENTS_DEBUG}) - get_filename_component(_ILM_LIBDIR ${LIB} DIRECTORY) - list(APPEND IlmBase_DEBUG_LIBRARIES ${LIB}) - list(APPEND IlmBase_DEBUG_LIBRARY_DIRS ${_ILM_LIBDIR}) -endforeach() - -list(REMOVE_DUPLICATES IlmBase_RELEASE_LIBRARY_DIRS) -list(REMOVE_DUPLICATES IlmBase_DEBUG_LIBRARY_DIRS) - -set(IlmBase_LIBRARIES ${IlmBase_RELEASE_LIBRARIES}) -set(IlmBase_LIBRARY_DIRS ${IlmBase_RELEASE_LIBRARY_DIRS}) - -# We have to add both include and include/OpenEXR to the include -# path in case OpenEXR and IlmBase are installed separately. -# -# Make sure we get the absolute path to avoid issues where -# /usr/include/OpenEXR/../ is picked up and passed to gcc from cmake -# which won't correctly compute /usr/include as an implicit system -# dir if the path is relative: -# -# https://github.com/AcademySoftwareFoundation/openvdb/issues/632 -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129 - -set(_IlmBase_Parent_Dir "") -get_filename_component(_IlmBase_Parent_Dir - ${IlmBase_INCLUDE_DIR}/../ ABSOLUTE) - -set(IlmBase_INCLUDE_DIRS) -list(APPEND IlmBase_INCLUDE_DIRS - ${_IlmBase_Parent_Dir} - ${IlmBase_INCLUDE_DIR} -) -unset(_IlmBase_Parent_Dir) - -# Configure imported targets - -foreach(COMPONENT ${IlmBase_FIND_COMPONENTS}) - # Configure lib type. If XXX_USE_STATIC_LIBS, we always assume a static - # lib is in use. If win32, we can't mark the import .libs as shared, so - # these are always marked as UNKNOWN. Otherwise, infer from extension. - set(ILMBASE_${COMPONENT}_LIB_TYPE UNKNOWN) - if(ILMBASE_USE_STATIC_LIBS) - set(ILMBASE_${COMPONENT}_LIB_TYPE STATIC) - elseif(UNIX) - get_filename_component(_ILMBASE_${COMPONENT}_EXT ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} EXT) - if(${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".a") - set(ILMBASE_${COMPONENT}_LIB_TYPE STATIC) - elseif(${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".so" OR - ${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".dylib") - set(ILMBASE_${COMPONENT}_LIB_TYPE SHARED) - endif() - endif() - - set(IlmBase_${COMPONENT}_DEFINITIONS) - - # Add the OPENEXR_DLL define if the library is not static on WIN32 - if(WIN32) - if(NOT ILMBASE_${COMPONENT}_LIB_TYPE STREQUAL STATIC) - list(APPEND IlmBase_${COMPONENT}_DEFINITIONS OPENEXR_DLL) - endif() - endif() - - if(NOT TARGET IlmBase::${COMPONENT}) - add_library(IlmBase::${COMPONENT} ${ILMBASE_${COMPONENT}_LIB_TYPE} IMPORTED) - set_target_properties(IlmBase::${COMPONENT} PROPERTIES - INTERFACE_COMPILE_OPTIONS "${PC_IlmBase_CFLAGS_OTHER}" - INTERFACE_COMPILE_DEFINITIONS "${IlmBase_${COMPONENT}_DEFINITIONS}" - INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}") - - # Standard location - set_target_properties(IlmBase::${COMPONENT} PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}") - - # Release location - if(EXISTS "${IlmBase_${COMPONENT}_LIBRARY_RELEASE}") - set_property(TARGET IlmBase::${COMPONENT} APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(IlmBase::${COMPONENT} PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" - IMPORTED_LOCATION_RELEASE "${IlmBase_${COMPONENT}_LIBRARY_RELEASE}") - endif() - - # Debug location - if(EXISTS "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}") - set_property(TARGET IlmBase::${COMPONENT} APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(IlmBase::${COMPONENT} PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" - IMPORTED_LOCATION_DEBUG "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}") - endif() - endif() -endforeach() diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake index d7acaad1d0..c4213c853a 100644 --- a/cmake/FindOpenVDB.cmake +++ b/cmake/FindOpenVDB.cmake @@ -653,19 +653,7 @@ if(OpenVDB_USES_LOG4CPLUS) endif() if(OpenVDB_USES_IMATH_HALF) - find_package(Imath CONFIG) - if (NOT TARGET Imath::Imath) - find_package(IlmBase REQUIRED COMPONENTS Half) - endif() - - if(WIN32) - # @note OPENVDB_OPENEXR_STATICLIB is old functionality and should be removed - if(OPENEXR_USE_STATIC_LIBS OR - ("${ILMBASE_LIB_TYPE}" STREQUAL "STATIC_LIBRARY") OR - ("${IMATH_LIB_TYPE}" STREQUAL "STATIC_LIBRARY")) - list(APPEND OpenVDB_DEFINITIONS OPENVDB_OPENEXR_STATICLIB) - endif() - endif() + find_package(Imath REQUIRED CONFIG) endif() if(UNIX) @@ -673,7 +661,7 @@ if(UNIX) endif() # Set deps. Note that the order here is important. If we're building against -# Houdini 17.5 we must include IlmBase deps first to ensure the users chosen +# Houdini we must include Imath deps first to ensure the users chosen # namespaced headers are correctly prioritized. Otherwise other include paths # from shared installs (including houdini) may pull in the wrong headers @@ -685,7 +673,7 @@ if(OpenVDB_USES_DELAYED_LOADING) endif() if(OpenVDB_USES_IMATH_HALF) - list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES $ $) + list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES Imath::Imath) endif() if(OpenVDB_USES_LOG4CPLUS) diff --git a/cmake/OpenVDBGLFW3Setup.cmake b/cmake/OpenVDBGLFW3Setup.cmake index 24a7aea0d1..c0fac4c716 100644 --- a/cmake/OpenVDBGLFW3Setup.cmake +++ b/cmake/OpenVDBGLFW3Setup.cmake @@ -121,6 +121,13 @@ if(${CMAKE_VERSION} VERSION_LESS 3.19) ) endif() +if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_GLFW_VERSION) + if(glfw3_VERSION VERSION_LESS ${FUTURE_MINIMUM_GLFW_VERSION}) + message(DEPRECATION "Support for GLFW versions < ${FUTURE_MINIMUM_GLFW_VERSION} " + "is deprecated and will be removed.") + endif() +endif() + unset(glfw3_FIND_VERSION) # GLFW 3.1 does not export INTERFACE_LINK_LIBRARIES so detect this diff --git a/cmake/OpenVDBHoudiniSetup.cmake b/cmake/OpenVDBHoudiniSetup.cmake index e92c3b648c..2de38b53f6 100644 --- a/cmake/OpenVDBHoudiniSetup.cmake +++ b/cmake/OpenVDBHoudiniSetup.cmake @@ -49,8 +49,6 @@ overwrite user provided values. ``ZLIB_LIBRARY`` ``OPENEXR_INCLUDEDIR`` ``OPENEXR_LIBRARYDIR`` -``ILMBASE_INCLUDEDIR`` -``ILMBASE_LIBRARYDIR`` ``TBB_INCLUDEDIR`` ``TBB_LIBRARYDIR`` ``BLOSC_INCLUDEDIR`` @@ -147,14 +145,6 @@ elseif(MINIMUM_HOUDINI_VERSION) endif() endif() -# Temporary change to support Houdini 19 which deploys with Blosc 1.5. -# This allows VDB to continue to build using Blosc 1.5. This support -# will be dropped in VDB 11 -if(Houdini_VERSION VERSION_LESS 19.5) - message(DEPRECATION "Setting MINIMUM_BLOSC_VERSION to 1.5.0 for Houdini 19.0 compatibility.") - set(MINIMUM_BLOSC_VERSION 1.5.0) -endif() - set(Houdini_VERSION_MAJOR_MINOR "${Houdini_VERSION_MAJOR}.${Houdini_VERSION_MINOR}") find_package(PackageHandleStandardArgs) @@ -311,21 +301,10 @@ if(NOT OPENEXR_LIBRARYDIR) set(OPENEXR_LIBRARYDIR ${HOUDINI_LIB_DIR}) endif() -# IlmBase - -if(NOT ILMBASE_INCLUDEDIR) - set(ILMBASE_INCLUDEDIR ${HOUDINI_INCLUDE_DIR}) -endif() -if(NOT ILMBASE_LIBRARYDIR) - set(ILMBASE_LIBRARYDIR ${HOUDINI_LIB_DIR}) -endif() - # Boost - currently must be provided as VDB is not fully configured to # use Houdini's namespaced hboost -# Versions of Houdini >= 17.5 have some namespaced libraries (IlmBase/OpenEXR). # Add the required suffix as part of the cmake lib suffix searches - if(APPLE) list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "_sidefx.dylib") elseif(UNIX) diff --git a/cmake/config/OpenVDBVersions.cmake b/cmake/config/OpenVDBVersions.cmake index df94e73a17..ac36f582e7 100644 --- a/cmake/config/OpenVDBVersions.cmake +++ b/cmake/config/OpenVDBVersions.cmake @@ -27,7 +27,7 @@ set(OPENVDB_DEPRECATED_ABI_LIST ${MINIMUM_OPENVDB_ABI_VERSION} ${_PREV_ABI}) unset(_PREV_ABI) if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS) - # @note Currently tracking CY2021 of the VFX platform where available + # @note Currently tracking CY2022 of the VFX platform where available # @Note Compiler versions are not really a hard and fast rule, you just need # a compiler with complete support for our MINIMUM_CXX_STANDARD (currently 17). @@ -37,46 +37,48 @@ if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS) set(MINIMUM_GCC_VERSION 9.3.1) set(MINIMUM_CLANG_VERSION 5.0) set(MINIMUM_ICC_VERSION 19) - set(MINIMUM_MSVC_VERSION 19.10) # 1910 (Visual Studio 2017 15.0) + set(MINIMUM_MSVC_VERSION 19.28) # 1928 (Visual Studio 2019 Version 16.8 + 16.9) - set(MINIMUM_BOOST_VERSION 1.73) + set(MINIMUM_BOOST_VERSION 1.76) set(MINIMUM_PYBIND_VERSION 2.9.1) - set(MINIMUM_ILMBASE_VERSION 2.4) - set(MINIMUM_OPENEXR_VERSION 2.4) + set(MINIMUM_IMATH_VERSION 3.1) + set(MINIMUM_OPENEXR_VERSION 3.1) set(MINIMUM_ZLIB_VERSION 1.2.7) - set(MINIMUM_TBB_VERSION 2020.2) + set(MINIMUM_TBB_VERSION 2020.3) set(MINIMUM_LLVM_VERSION 10.0.0) set(MINIMUM_BLOSC_VERSION 1.17.0) + set(MINIMUM_GLFW_VERSION 3.1) - set(MINIMUM_PYTHON_VERSION 3.7) - set(MINIMUM_NUMPY_VERSION 1.19.0) + set(MINIMUM_PYTHON_VERSION 3.9.1) + set(MINIMUM_NUMPY_VERSION 1.20.0) set(MINIMUM_GOOGLETEST_VERSION 1.10) - set(MINIMUM_GLFW_VERSION 3.1) set(MINIMUM_LOG4CPLUS_VERSION 1.1.2) - set(MINIMUM_HOUDINI_VERSION 19.0) + set(MINIMUM_HOUDINI_VERSION 19.5) # These always promote warnings rather than errors set(MINIMUM_MAYA_VERSION 2017) set(MINIMUM_DOXYGEN_VERSION 1.8.8) endif() -# VFX 22 deprecations to transition to MINIMUM_* variables in OpenVDB 11.0.0 +# VFX 23 deprecations to transition to MINIMUM_* variables in OpenVDB 12.0.0 # @note At the time of writing, any variables that are commented out don't # have target transitional versions. set(FUTURE_MINIMUM_GCC_VERSION 11.2.1) -set(FUTURE_MINIMUM_MSVC_VERSION 19.28) # 1928 (Visual Studio 2019 Version 16.8 + 16.9) +set(FUTURE_MINIMUM_MSVC_VERSION 19.30) # 1930 (Visual Studio 2022) # set(FUTURE_MINIMUM_ICC_VERSION 19) -# set(FUTURE_MINIMUM_CXX_STANDARD 17) -# set(FUTURE_MINIMUM_CMAKE_VERSION 3.18) -set(FUTURE_MINIMUM_ILMBASE_VERSION 3.1) -set(FUTURE_MINIMUM_OPENEXR_VERSION 3.1) -set(FUTURE_MINIMUM_BOOST_VERSION 1.76) +# set(FUTURE_MINIMUM_CXX_STANDARD 20) +set(FUTURE_MINIMUM_CMAKE_VERSION 3.20) +# set(FUTURE_MINIMUM_OPENEXR_VERSION 3.1) +set(FUTURE_MINIMUM_BOOST_VERSION 1.80) +set(FUTURE_MINIMUM_GLFW_VERSION 3.3) +set(FUTURE_MINIMUM_LOG4CPLUS_VERSION 2.0) + # set(FUTURE_MINIMUM_BLOSC_VERSION 1.17.0) -set(FUTURE_MINIMUM_TBB_VERSION 2020.3) -set(FUTURE_MINIMUM_PYTHON_VERSION 3.9.1) -set(FUTURE_MINIMUM_NUMPY_VERSION 1.20.0) -set(FUTURE_MINIMUM_HOUDINI_VERSION 19.5) -# set(FUTURE_MINIMUM_LLVM_VERSION 10.0.0) +# set(FUTURE_MINIMUM_TBB_VERSION 2020.3) +set(FUTURE_MINIMUM_PYTHON_VERSION 3.10) +set(FUTURE_MINIMUM_NUMPY_VERSION 1.23.0) +# set(FUTURE_MINIMUM_HOUDINI_VERSION 20.0) +set(FUTURE_MINIMUM_LLVM_VERSION 13.0.0) diff --git a/cmake/scripts/ubsan.supp b/cmake/scripts/ubsan.supp index ae5d34ed40..c0b6a6ca92 100644 --- a/cmake/scripts/ubsan.supp +++ b/cmake/scripts/ubsan.supp @@ -16,9 +16,6 @@ vptr:tbb/task.h ##### OpenVDB ##### -# The sOn/sOff static bool data held on the LeaffBuff objects can be -# initialised to arbitrary true/false values. See the note in LeafBuffer.h -enum:openvdb/tools/Activate.h # Some 2s complement tests, ignore the negative shifts # @todo Should address these shift-base:TestMultiResGrid.cc diff --git a/doc/build.txt b/doc/build.txt index dbaf03d6f5..3dbfb48d57 100644 --- a/doc/build.txt +++ b/doc/build.txt @@ -87,7 +87,7 @@ given FindModule e.g. `FindBlosc.cmake`: - @b Xxx_ROOT - Preferred installation prefix. The given dependency is expected to follow a folder structure `Xxx_ROOT/include` and `Xxx_ROOT/lib` exist. Note that unlike the above, this is the case matching name of the - find package .i.e. Blosc_ROOT, IlmBase_ROOT, TBB_ROOT etc. + find package .i.e. Blosc_ROOT, TBB_ROOT etc. - @b XXX_INCLUDEDIR / @b XXX_LIBRARYDIR - Preferred include and library directories - @b SYSTEM_LIBRARY_PATHS - A list of paths appended to all include and lib @@ -238,8 +238,8 @@ it's a good idea to read the above section on DCC | Supported Version | OpenVDB ABI | -------- | ----------------- | ----------- | -Houdini | 19.0 | 8 | Houdini | 19.5 | 9 | +Houdini | 20.0 | 10 | Maya | 2018 | Any | Maya | 2019 | Any | @@ -355,7 +355,7 @@ CppUnit | A unit testing framework module for C++ GLFW | Simple API for OpenGL development | OpenVDB View | Doxygen | Documentation generation from C++ | Documentation | OpenEXR | EXR serialization support | OpenVDB Render | -IlmBase | Used half precision floating points and EXR serialization support | Optional (All) | +Imath | Used half precision floating points and EXR serialization support | Optional (All) | Log4cplus | An optional dependency for improved OpenVDB Logging | Optional (All) | PyBind11 | C++/python bindings | Optional (Python) | NumPy | Scientific computing with Python | Optional (Python) | @@ -394,14 +394,12 @@ Optional: install the Maya plugin to. Defaults to the value of `${CMAKE_INSTALL_PREFIX}/maya${Maya_VERSION}` - @b BOOST_ROOT =`/path/to/boost/install` # Path to boost. May not be required, CMake may find it automatically - - @b IlmBase_ROOT =`/path/to/ilmbase/install` # Path to ilmbase. For example on MacOS and where the build folder has been created inside the OpenVDB source root: @code cmake -D BOOST_ROOT=/path/to/boost/install \ - -D IlmBase_ROOT=/path/to/ilmbase/install \ -D Maya_ROOT=/Applications/Autodesk/maya2019/ \ -D USE_MAYA=ON \ ../ @@ -609,8 +607,17 @@ OpenVDB uses [imported targets](https://cmake.org/cmake/help/latest/command/add_ for all its dependencies. For imported Boost compatibility, the following versions of CMake are required: - - Boost 1.68, 1.69 require CMake 3.13 or newer. - - Boost 1.70 requires CMake 3.14 or newer. + - Boost 1.73 requires CMake 3.17.2 or newer. + - Boost 1.74 requires CMake 3.19 or newer. + - Boost 1.75 requires CMake 3.19.5 or newer. + - Boost 1.76 requires CMake 3.20.3 or newer. + - Boost 1.77 requires CMake 3.21.3 or newer. + - Boost 1.78 requires CMake 3.22.2 or newer. + - Boost 1.79 requires CMake 3.23.2 or newer. + - Boost 1.80 requires CMake 3.24.2 or newer. + - Boost 1.81 requires CMake 3.25.2 or newer. + - Boost 1.82 requires CMake 3.27.0 or newer. + - Boost 1.83 requires CMake 3.27.4 or newer. Use the above list to identify the version of CMake you require for your version of Boost. Note that this may be implemented into the OpenVDB CMake in the future. diff --git a/doc/dependencies.txt b/doc/dependencies.txt index 113c20a003..f8c730a015 100644 --- a/doc/dependencies.txt +++ b/doc/dependencies.txt @@ -9,7 +9,6 @@ - @ref depInstallingDependencies - @ref depUsingAptGet - @ref depUsingHomebrew - - @ref depManInstall ------------------------------------------------------------------------------ @@ -37,10 +36,10 @@ Reference Platform, but for those that do, their specified versions are Component | Requirements | Optional ----------------------- | ----------------------------------------------- | -------- -OpenVDB Core Library | CMake, C++17 compiler, TBB::tbb, Boost::headers | Blosc, ZLib, Log4cplus, IlmBase::Half, Boost::iostream +OpenVDB Core Library | CMake, C++17 compiler, TBB::tbb, Boost::headers | Blosc, ZLib, Log4cplus, Imath::Imath, Boost::iostream OpenVDB Print | Core Library dependencies | - OpenVDB LOD | Core Library dependencies | - -OpenVDB Render | Core Library dependencies | OpenEXR, IlmBase, libpng +OpenVDB Render | Core Library dependencies | OpenEXR, Imath::Imath, libpng OpenVDB View | Core Library dependencies, OpenGL, GLFW3, GLEW* | - OpenVDB Python | Core Library dependencies, Python, PyBind11 | NumPy OpenVDB AX | Core Library dependencies, LLVM | Bison, Flex @@ -58,27 +57,27 @@ OpenVDB Documentation | Doxygen | - Package | Minimum | Recommended | Description | apt-get | Homebrew | Source -------------- | ------- | ----------- | ----------------------------------------------------------------- | ------- | -------- | ------ CMake | 3.18 | Latest | Cross-platform family of tools designed to help build software | Y | Y | https://cmake.org -GCC | 9.3.1 | 9.3.1 | C++ 17 Compiler: The GNU Compiler Collection | Y | Y | https://www.gnu.org/software/gcc +GCC | 9.3.1 | 11.2.1 | C++ 17 Compiler: The GNU Compiler Collection | Y | Y | https://www.gnu.org/software/gcc Clang | 5.0 | Latest | C++ 17 Compiler: A C language family frontend for LLVM | Y | Y | https://clang.llvm.org Intel ICC | 19 | Latest | C++ 17 Compiler: Intels C++ Compiler | Y | Y | https://software.intel.com/en-us/c-compilers -MSVC | 19.28 | Latest | C++ 17 Compiler: Microsoft Visual C++ Compiler | Y | Y | https://visualstudio.microsoft.com/vs -IlmBase | 2.4 | Removed | Used half precision floating points and EXR serialization support | Y | Y | http://www.openexr.com -OpenEXR | 2.4 | 3.1 | EXR serialization support | Y | Y | http://www.openexr.com +MSVC | 19.28 | 19.30 | C++ 17 Compiler: Microsoft Visual C++ Compiler | Y | Y | https://visualstudio.microsoft.com/vs +Imath | 3.1 | Latest | Half precision floating points | Y | Y | http://www.openexr.com +OpenEXR | 3.1 | Latest | EXR serialization support | Y | Y | http://www.openexr.com TBB | 2020.2 | 2020.3 | Threading Building Blocks - template library for task parallelism | Y | Y | https://www.threadingbuildingblocks.org ZLIB | 1.2.7 | Latest | Compression library for disk serialization compression | Y | Y | https://www.zlib.net -Boost | 1.73 | 1.76 | Components: headers, iostreams | Y | Y | https://www.boost.org -LLVM | 10.0.0 | 10.0.0* | Target-independent code generation | Y | Y | https://llvm.org/ +Boost | 1.76 | 1.80 | Components: headers, iostreams | Y | Y | https://www.boost.org +LLVM | 10.0.0 | 13.0.0* | Target-independent code generation | Y | Y | https://llvm.org/ Bison | 3.0.0 | 3.7.0 | General-purpose parser generator | Y | Y | https://www.gnu.org/software/gcc Flex | 2.6.0 | 2.6.4 | Fast lexical analyzer generator | Y | Y | https://github.com/westes/flex -Python | 3.7 | 3.7 | The python interpreter and libraries | Y | Y | https://www.python.org +Python | 3.9.1 | 3.10 | The python interpreter and libraries | Y | Y | https://www.python.org PyBind11 | 2.9.1 | Latest | C++/python bindings | Y | Y | https://pybind11.readthedocs.io -NumPy | 1.19.0 | 1.20.0 | Scientific computing with Python | Y | Y | http://www.numpy.org +NumPy | 1.20.0 | 1.23.0 | Scientific computing with Python | Y | Y | http://www.numpy.org GoogleTest | 1.10 | Latest | A unit testing framework module for C++ | Y | Y | https://github.com/google/googletest CppUnit | 1.10 | Latest | A unit testing framework module for C++ | N | Y | https://freedesktop.org/wiki/Software/cppunit Blosc | 1.17.0* | 1.17.0 | Recommended dependency for improved disk compression | Y | Y | https://github.com/Blosc/c-blosc/releases Log4cplus | 1.1.2 | Latest | An optional dependency for improved OpenVDB Logging | Y | Y | https://github.com/log4cplus/log4cplus libpng | - | Latest | Library for manipulating PNG images | Y | Y | http://www.libpng.org/pub/png/libpng.html -GLFW | 3.1 | Latest | Simple API for OpenGL development | Y | Y | https://www.glfw.org +GLFW | 3.1 | > 3.3 | Simple API for OpenGL development | Y | Y | https://www.glfw.org OpenGL | 3.2 | Latest | Environment for developing portable graphics applications | Y | Y | https://www.opengl.org GLEW | 1.0.0 | Latest | A cross-platform OpenGL extension loading library. | Y | Y | http://glew.sourceforge.net CUDA | - | Latest | Parallel computing platform for graphical processing units. | Y | N | https://developer.nvidia.com/cuda-downloads @@ -97,8 +96,8 @@ Doxygen | 1.8.8 | 1.8.11 | Documentation generation from C++ segfault on closure. Fixed in GLFW 3.3 - @b Blosc: OpenVDB has historically used an old version of blosc (1.5.0) to - serialize .vdb files. OpenVDB has recently moved to a new blosc version minimum - of 1.17.0. We have tested a range of blosc versions and found that the following + serialize .vdb files. OpenVDB has moved to a new blosc version minimum of + 1.17.0. We have tested a range of blosc versions and found that the following versions are NOT compatible with OpenVDB caches written using blosc 1.5.0. Additionally these versions of blosc may generally not be compatible with OpenVDB itself. Avoid using these versions and upgrade to the new minimum of 1.17.0 where @@ -137,9 +136,6 @@ Pin-Priority: 990 Alternatively you can install any missing dependencies manually or through other package managers. -@b Note:CppUnit is unavailable using apt-get. See the other package manager -methods or the [manual installation](@ref depManInstall) options. - @code{.sh} #!/bin/bash # Core library @@ -149,17 +145,17 @@ apt-get install zlibc # zlib apt-get install libboost-iostreams-dev # Boost::iostream apt-get install libblosc-dev # Blosc # AX -apt-get install llvm-10-dev # LLVM +apt-get install llvm-10-dev # LLVM # Python apt-get install pybind11-dev # Python apt-get install python-dev # Python apt-get install python-numpy # NumPy # Optional apt-get install libpng-dev # libpng -apt-get install libilmbase-dev # IlmBase apt-get install libopenexr-dev # OpenEXR apt-get install liblog4cplus-dev # Log4cplus apt-get install googletest # GoogleTest +apt-get install libcppunit-dev # CppUnit # vdb_view apt-get install libglfw3-dev # GLFW # Documentation @@ -193,32 +189,10 @@ brew install cppunit # CppUnit # vdb_view brew install glfw # GLFW # vdb_render -brew install ilmbase # IlmBase brew install openexr # OpenEXR brew install libpng # libpng # Documentation brew install doxygen # Doxygen @endcode -@subsection depManInstall UNIX Manual Installations - -Some dependencies may be unavailable using the above package manager methods. -Below are manual installation methods for these packages. Note that you will -have to provide your chosen installation locations to the OpenVDB CMake build -system when building OpenVDB. - -@b CppUnit (for AX Unit Tests) - -@code{.sh} -#!/bin/bash -wget http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz -tar -xvzf cppunit-1.13.2.tar.gz -cd cppunit-1.13.2 -# Install to users home directory - you may customise this location -mkdir -p $HOME/cppunit -./configure --prefix=$HOME/cppunit -make -make install -@endcode - */ diff --git a/doc/img/banner.png b/doc/img/banner.png new file mode 100644 index 0000000000..95378aae2d Binary files /dev/null and b/doc/img/banner.png differ diff --git a/doc/python.txt b/doc/python.txt index 304f4ca579..043d3e3c24 100644 --- a/doc/python.txt +++ b/doc/python.txt @@ -4,10 +4,8 @@ This section describes the OpenVDB Python module and includes Python code snippets and some complete programs that illustrate how to perform common tasks. -(An API reference is also available, -if Epydoc is installed.) -As of OpenVDB 2.0, the Python module exposes most of the functionality -of the C++ @vdblink::Grid Grid@endlink class, including I/O, metadata +The Python module exposes most of the functionality of the C++ +@vdblink::Grid Grid@endlink class, including I/O, metadata management, voxel access and iteration, but almost none of the many @ref secToolUtils "tools". We expect to add support for tools in forthcoming releases. diff --git a/openvdb/openvdb/CMakeLists.txt b/openvdb/openvdb/CMakeLists.txt index 71d15d1c79..2af2759bfb 100644 --- a/openvdb/openvdb/CMakeLists.txt +++ b/openvdb/openvdb/CMakeLists.txt @@ -132,23 +132,22 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION) endif() if(USE_IMATH_HALF) - find_package(Imath CONFIG) - if (NOT TARGET Imath::Imath) - find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half) - if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION) - if(${IlmBase_VERSION} VERSION_LESS FUTURE_MINIMUM_ILMBASE_VERSION) - message(DEPRECATION "Support for IlmBase versions < ${FUTURE_MINIMUM_ILMBASE_VERSION} " - "is deprecated and will be removed.") - endif() - endif() - else() - message(STATUS "Found Imath ${Imath_VERSION}") - endif() + find_package(Imath ${MINIMUM_IMATH_VERSION} REQUIRED CONFIG) + get_target_property(openvdb_imath_includes Imath::Imath INTERFACE_INCLUDE_DIRECTORIES) + message(STATUS "Found Imath: ${openvdb_imath_includes} (found suitable version \"${Imath_VERSION}\", " + "minimum required is \"${MINIMUM_IMATH_VERSION}\")") + unset(openvdb_imath_includes) endif() if(USE_LOG4CPLUS) # Find Log4CPlus libraries find_package(Log4cplus ${MINIMUM_LOG4CPLUS_VERSION} REQUIRED) + if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_LOG4CPLUS_VERSION) + if(${Log4cplus_VERSION} VERSION_LESS FUTURE_MINIMUM_LOG4CPLUS_VERSION) + message(DEPRECATION "Support for Log4cplus versions < ${FUTURE_MINIMUM_LOG4CPLUS_VERSION} " + "is deprecated and will be removed.") + endif() + endif() endif() if(USE_BLOSC) @@ -208,8 +207,7 @@ endif() set(OPENVDB_CORE_DEPENDENT_LIBS "") if(USE_IMATH_HALF) - list(APPEND OPENVDB_CORE_DEPENDENT_LIBS - $ $) + list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Imath::Imath) endif() # We then choose to pull in TBB. If building aganst Houdini, TBB should @@ -636,15 +634,6 @@ if(MINGW) list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -D_USE_MATH_DEFINES) endif() -if(WIN32) - if(USE_IMATH_HALF) - # @note OPENVDB_OPENEXR_STATICLIB is old functionality and should be removed - if(ILMBASE_USE_STATIC_LIBS OR ("${ILMBASE_Half_LIB_TYPE}" STREQUAL STATIC)) - list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_OPENEXR_STATICLIB) - endif() - endif() -endif() - if(USE_LOG4CPLUS) list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_USE_LOG4CPLUS) endif() diff --git a/openvdb/openvdb/Platform.h b/openvdb/openvdb/Platform.h index b6b0d24c7b..b8a8f1cb6f 100644 --- a/openvdb/openvdb/Platform.h +++ b/openvdb/openvdb/Platform.h @@ -67,12 +67,6 @@ #if defined(_DLL) && !defined(OPENVDB_STATICLIB) && !defined(OPENVDB_DLL) #define OPENVDB_DLL #endif - - // By default, assume that we're dynamically linking OpenEXR, unless - // OPENVDB_OPENEXR_STATICLIB is defined. - #if !defined(OPENVDB_OPENEXR_STATICLIB) && !defined(OPENEXR_DLL) - #define OPENEXR_DLL - #endif #endif /// Macros to suppress undefined behaviour sanitizer warnings. Should be used diff --git a/openvdb/openvdb/openvdb.cc b/openvdb/openvdb/openvdb.cc index 4a9d08d635..c776409dfc 100644 --- a/openvdb/openvdb/openvdb.cc +++ b/openvdb/openvdb/openvdb.cc @@ -14,31 +14,31 @@ #include #endif -#if OPENVDB_ABI_VERSION_NUMBER <= 7 - #error ABI <= 7 is no longer supported +#if OPENVDB_ABI_VERSION_NUMBER <= 8 + #error ABI <= 8 is no longer supported #endif // If using an OPENVDB_ABI_VERSION_NUMBER that has been deprecated, issue an // error directive. This can be optionally suppressed by defining: // OPENVDB_USE_DEPRECATED_ABI_=ON. -#ifndef OPENVDB_USE_DEPRECATED_ABI_8 - #if OPENVDB_ABI_VERSION_NUMBER == 8 - #error ABI = 8 is deprecated, CMake option OPENVDB_USE_DEPRECATED_ABI_8 suppresses this error - #endif -#endif #ifndef OPENVDB_USE_DEPRECATED_ABI_9 #if OPENVDB_ABI_VERSION_NUMBER == 9 #error ABI = 9 is deprecated, CMake option OPENVDB_USE_DEPRECATED_ABI_9 suppresses this error #endif #endif +#ifndef OPENVDB_USE_DEPRECATED_ABI_10 + #if OPENVDB_ABI_VERSION_NUMBER == 10 + #error ABI = 10 is deprecated, CMake option OPENVDB_USE_DEPRECATED_ABI_10 suppresses this error + #endif +#endif // If using a future OPENVDB_ABI_VERSION_NUMBER, issue an error directive. // This can be optionally suppressed by defining: // OPENVDB_USE_FUTURE_ABI_=ON. -#ifndef OPENVDB_USE_FUTURE_ABI_11 - #if OPENVDB_ABI_VERSION_NUMBER == 11 - #error ABI = 11 is still in active development and has not been finalized, \ -CMake option OPENVDB_USE_FUTURE_ABI_11 suppresses this error +#ifndef OPENVDB_USE_FUTURE_ABI_12 + #if OPENVDB_ABI_VERSION_NUMBER == 12 + #error ABI = 12 is still in active development and has not been finalized, \ +CMake option OPENVDB_USE_FUTURE_ABI_12 suppresses this error #endif #endif diff --git a/openvdb/openvdb/points/AttributeArray.h b/openvdb/openvdb/points/AttributeArray.h index f363a6d8b1..cbbab2d955 100644 --- a/openvdb/openvdb/points/AttributeArray.h +++ b/openvdb/openvdb/points/AttributeArray.h @@ -767,10 +767,8 @@ class TypedAttributeArray final: public AttributeArray /// Return @c true if all data has been loaded bool isDataLoaded() const override; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Return the raw data buffer inline const StorageType* constData() const { return this->data(); } -#endif protected: AccessorBasePtr getAccessor() const override; diff --git a/openvdb/openvdb/tree/InternalNode.h b/openvdb/openvdb/tree/InternalNode.h index 9e4e1589da..2d1cf52e7a 100644 --- a/openvdb/openvdb/tree/InternalNode.h +++ b/openvdb/openvdb/tree/InternalNode.h @@ -268,12 +268,10 @@ class InternalNode /// Set the grid index coordinates of this node's local origin. void setOrigin(const Coord& origin) { mOrigin = origin; } -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Return the transient data value. Index32 transientData() const { return mTransientData; } /// Set the transient data value. void setTransientData(Index32 transientData) { mTransientData = transientData; } -#endif Index32 leafCount() const; void nodeCount(std::vector &vec) const; @@ -795,10 +793,8 @@ class InternalNode NodeMaskType mChildMask, mValueMask; /// Global grid index coordinates (x,y,z) of the local origin of this node Coord mOrigin; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Transient data (not serialized) Index32 mTransientData = 0; -#endif }; // class InternalNode @@ -882,9 +878,7 @@ InternalNode::InternalNode(const InternalNode& other) : mChildMask(other.mChildMask) , mValueMask(other.mValueMask) , mOrigin(other.mOrigin) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { DeepCopy > tmp(&other, this); } @@ -898,9 +892,7 @@ InternalNode::InternalNode(const InternalNode= 9 , mTransientData(other.mTransientData) -#endif { DeepCopy > tmp(&other, this); } @@ -937,9 +929,7 @@ InternalNode::InternalNode(const InternalNode= 9 , mTransientData(other.mTransientData) -#endif { TopologyCopy1 > tmp(&other, this, background); } @@ -977,9 +967,7 @@ InternalNode::InternalNode(const InternalNode= 9 , mTransientData(other.mTransientData) -#endif { TopologyCopy2 > tmp(&other, this, offValue, onValue); } diff --git a/openvdb/openvdb/tree/LeafBuffer.h b/openvdb/openvdb/tree/LeafBuffer.h index e685b733a3..ce33101685 100644 --- a/openvdb/openvdb/tree/LeafBuffer.h +++ b/openvdb/openvdb/tree/LeafBuffer.h @@ -475,9 +475,8 @@ class LeafBuffer static const Index WORD_COUNT = NodeMaskType::WORD_COUNT; static const Index SIZE = 1 << 3 * Log2Dim; - // These static declarations must be on separate lines to avoid VC9 compiler errors. - static const bool sOn; - static const bool sOff; + static inline const bool sOn = true; + static inline const bool sOff = false; LeafBuffer() {} LeafBuffer(bool on): mData(on) {} @@ -521,16 +520,6 @@ class LeafBuffer NodeMaskType mData; }; // class LeafBuffer - -/// @internal For consistency with other nodes and with iterators, methods like -/// LeafNode::getValue() return a reference to a value. Since it's not possible -/// to return a reference to a bit in a node mask, we return a reference to one -/// of the following static values instead. -/// -/// @todo Make these static inline with C++17 -template const bool LeafBuffer::sOn = true; -template const bool LeafBuffer::sOff = false; - } // namespace tree } // namespace OPENVDB_VERSION_NAME } // namespace openvdb diff --git a/openvdb/openvdb/tree/LeafNode.h b/openvdb/openvdb/tree/LeafNode.h index e520aa7a0b..33ec3a56ae 100644 --- a/openvdb/openvdb/tree/LeafNode.h +++ b/openvdb/openvdb/tree/LeafNode.h @@ -183,12 +183,10 @@ class LeafNode /// Return the global coordinates for a linear table offset. Coord offsetToGlobalCoord(Index n) const; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Return the transient data value. Index32 transientData() const { return mTransientData; } /// Set the transient data value. void setTransientData(Index32 transientData) { mTransientData = transientData; } -#endif /// Return a string representation of this node. std::string str() const; @@ -877,10 +875,8 @@ class LeafNode NodeMaskType mValueMask; /// Global grid index coordinates (x,y,z) of the local origin of this node Coord mOrigin; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Transient data (not serialized) Index32 mTransientData = 0; -#endif }; // end of LeafNode class @@ -936,9 +932,7 @@ LeafNode::LeafNode(const LeafNode& other) : mBuffer(other.mBuffer) , mValueMask(other.valueMask()) , mOrigin(other.mOrigin) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -950,9 +944,7 @@ inline LeafNode::LeafNode(const LeafNode& other) : mValueMask(other.valueMask()) , mOrigin(other.mOrigin) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { struct Local { /// @todo Consider using a value conversion functor passed as an argument instead. @@ -973,9 +965,7 @@ LeafNode::LeafNode(const LeafNode& other, : mBuffer(background) , mValueMask(other.valueMask()) , mOrigin(other.mOrigin) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -987,9 +977,7 @@ LeafNode::LeafNode(const LeafNode& other, const ValueType& offValue, const ValueType& onValue, TopologyCopy) : mValueMask(other.valueMask()) , mOrigin(other.mOrigin) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { for (Index i = 0; i < SIZE; ++i) { mBuffer[i] = (mValueMask.isOn(i) ? onValue : offValue); diff --git a/openvdb/openvdb/tree/LeafNodeBool.h b/openvdb/openvdb/tree/LeafNodeBool.h index 840a1de15b..02f3cb4c99 100644 --- a/openvdb/openvdb/tree/LeafNodeBool.h +++ b/openvdb/openvdb/tree/LeafNodeBool.h @@ -187,12 +187,10 @@ class LeafNode /// Return the global coordinates for a linear table offset. Coord offsetToGlobalCoord(Index n) const; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Return the transient data value. Index32 transientData() const { return mTransientData; } /// Set the transient data value. void setTransientData(Index32 transientData) { mTransientData = transientData; } -#endif /// Return a string representation of this node. std::string str() const; @@ -728,10 +726,8 @@ class LeafNode Buffer mBuffer; /// Global grid index coordinates (x,y,z) of the local origin of this node Coord mOrigin; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Transient data (not serialized) Index32 mTransientData = 0; -#endif private: /// @brief During topology-only construction, access is needed @@ -796,9 +792,7 @@ LeafNode::LeafNode(const LeafNode &other) : mValueMask(other.valueMask()) , mBuffer(other.mBuffer) , mOrigin(other.mOrigin) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -810,9 +804,7 @@ inline LeafNode::LeafNode(const LeafNode& other) : mValueMask(other.valueMask()) , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { struct Local { /// @todo Consider using a value conversion functor passed as an argument instead. @@ -833,9 +825,7 @@ LeafNode::LeafNode(const LeafNode& other, : mValueMask(other.valueMask()) , mBuffer(background) , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -847,9 +837,7 @@ LeafNode::LeafNode(const LeafNode& other, Topolo : mValueMask(other.valueMask()) , mBuffer(other.valueMask())// value = active state , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -858,16 +846,11 @@ inline LeafNode::LeafNode(const Coord& xyz, const NodeMaskType& mask, const Buffer& buff, -#if OPENVDB_ABI_VERSION_NUMBER < 9 - [[maybe_unused]] -#endif const Index32 trans) : mValueMask(mask) , mBuffer(buff) , mOrigin(xyz & (~(DIM - 1))) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(trans) -#endif { } @@ -879,9 +862,7 @@ LeafNode::LeafNode(const LeafNode& other, : mValueMask(other.valueMask()) , mBuffer(offValue) , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { for (Index i = 0; i < SIZE; ++i) { if (mValueMask.isOn(i)) { diff --git a/openvdb/openvdb/tree/LeafNodeMask.h b/openvdb/openvdb/tree/LeafNodeMask.h index 132157ead4..a8e31ec9e7 100644 --- a/openvdb/openvdb/tree/LeafNodeMask.h +++ b/openvdb/openvdb/tree/LeafNodeMask.h @@ -169,12 +169,10 @@ class LeafNode /// Return the global coordinates for a linear table offset. Coord offsetToGlobalCoord(Index n) const; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Return the transient data value. Index32 transientData() const { return mTransientData; } /// Set the transient data value. void setTransientData(Index32 transientData) { mTransientData = transientData; } -#endif /// Return a string representation of this node. std::string str() const; @@ -712,10 +710,8 @@ class LeafNode Buffer mBuffer; /// Global grid index coordinates (x,y,z) of the local origin of this node Coord mOrigin; -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Transient data (not serialized) Index32 mTransientData = 0; -#endif private: /// @brief During topology-only construction, access is needed @@ -775,9 +771,7 @@ inline LeafNode::LeafNode(const LeafNode &other) : mBuffer(other.mBuffer) , mOrigin(other.mOrigin) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -789,9 +783,7 @@ inline LeafNode::LeafNode(const LeafNode& other) : mBuffer(other.valueMask()) , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -803,9 +795,7 @@ LeafNode::LeafNode(const LeafNode& other, bool, TopologyCopy) : mBuffer(other.valueMask())// value = active state , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -816,9 +806,7 @@ inline LeafNode::LeafNode(const LeafNode& other, TopologyCopy) : mBuffer(other.valueMask())// value = active state , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { } @@ -830,9 +818,7 @@ LeafNode::LeafNode(const LeafNode& other, bool offValue, bool onValue, TopologyCopy) : mBuffer(other.valueMask()) , mOrigin(other.origin()) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { if (offValue==true) { if (onValue==false) { diff --git a/openvdb/openvdb/tree/RootNode.h b/openvdb/openvdb/tree/RootNode.h index 468d1252cb..c9abc2e965 100644 --- a/openvdb/openvdb/tree/RootNode.h +++ b/openvdb/openvdb/tree/RootNode.h @@ -405,12 +405,10 @@ class RootNode /// Return the bounding box of this RootNode, i.e., an infinite bounding box. static CoordBBox getNodeBoundingBox() { return CoordBBox::inf(); } -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Return the transient data value. Index32 transientData() const { return mTransientData; } /// Set the transient data value. void setTransientData(Index32 transientData) { mTransientData = transientData; } -#endif /// @brief Change inactive tiles or voxels with a value equal to +/- the /// old background to the specified value (with the same sign). Active values @@ -967,10 +965,8 @@ class RootNode #if OPENVDB_ABI_VERSION_NUMBER >= 10 Coord mOrigin; #endif -#if OPENVDB_ABI_VERSION_NUMBER >= 9 /// Transient Data (not serialized) Index32 mTransientData = 0; -#endif }; // end of RootNode class @@ -1064,9 +1060,7 @@ RootNode::RootNode(const RootNode& other, #if OPENVDB_ABI_VERSION_NUMBER >= 10 , mOrigin(other.mOrigin) #endif -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { using OtherRootT = RootNode; @@ -1098,9 +1092,7 @@ RootNode::RootNode(const RootNode& other, #if OPENVDB_ABI_VERSION_NUMBER >= 10 , mOrigin(other.mOrigin) #endif -#if OPENVDB_ABI_VERSION_NUMBER >= 9 , mTransientData(other.mTransientData) -#endif { using OtherRootT = RootNode; @@ -1171,9 +1163,7 @@ struct RootNodeCopyHelper } self.mOrigin = other.mOrigin; #endif -#if OPENVDB_ABI_VERSION_NUMBER >= 9 self.mTransientData = other.mTransientData; -#endif self.clear(); self.initTable(); @@ -1206,9 +1196,7 @@ RootNode::operator=(const RootNode& other) OPENVDB_THROW(ValueError, "RootNode::operator=: non-zero offsets are currently not supported"); } #endif -#if OPENVDB_ABI_VERSION_NUMBER >= 9 mTransientData = other.mTransientData; -#endif this->clear(); this->initTable(); diff --git a/openvdb/openvdb/unittest/TestLeaf.cc b/openvdb/openvdb/unittest/TestLeaf.cc index 19ddfb411c..96efa1de71 100644 --- a/openvdb/openvdb/unittest/TestLeaf.cc +++ b/openvdb/openvdb/unittest/TestLeaf.cc @@ -518,7 +518,6 @@ TEST_F(TestLeaf, testCount) EXPECT_EQ(Index(3), dims[0]); } -#if OPENVDB_ABI_VERSION_NUMBER >= 9 TEST_F(TestLeaf, testTransientData) { using namespace openvdb; @@ -534,4 +533,3 @@ TEST_F(TestLeaf, testTransientData) LeafT leaf3 = leaf; EXPECT_EQ(Index32(5), leaf3.transientData()); } -#endif diff --git a/openvdb/openvdb/unittest/TestLeafBool.cc b/openvdb/openvdb/unittest/TestLeafBool.cc index 2ecfc75a33..f215dc5219 100644 --- a/openvdb/openvdb/unittest/TestLeafBool.cc +++ b/openvdb/openvdb/unittest/TestLeafBool.cc @@ -641,7 +641,6 @@ TEST_F(TestLeafBool, testMedian) // EXPECT_TRUE(tree->hasSameTopology(*copyOfTree)); // } -#if OPENVDB_ABI_VERSION_NUMBER >= 9 TEST_F(TestLeafBool, testTransientData) { LeafType leaf(openvdb::Coord(0, 0, 0), /*background=*/false); @@ -654,4 +653,3 @@ TEST_F(TestLeafBool, testTransientData) LeafType leaf3 = leaf; EXPECT_EQ(openvdb::Index32(5), leaf3.transientData()); } -#endif diff --git a/openvdb/openvdb/unittest/TestLeafMask.cc b/openvdb/openvdb/unittest/TestLeafMask.cc index 0868a21bc0..fa7eadba6c 100644 --- a/openvdb/openvdb/unittest/TestLeafMask.cc +++ b/openvdb/openvdb/unittest/TestLeafMask.cc @@ -562,7 +562,6 @@ TEST_F(TestLeafMask, testMedian) // EXPECT_TRUE(tree->hasSameTopology(*copyOfTree)); // } -#if OPENVDB_ABI_VERSION_NUMBER >= 9 TEST_F(TestLeafMask, testTransientData) { LeafType leaf(openvdb::Coord(0, 0, 0), /*background=*/false); @@ -575,4 +574,3 @@ TEST_F(TestLeafMask, testTransientData) LeafType leaf3 = leaf; EXPECT_EQ(openvdb::Index32(5), leaf3.transientData()); } -#endif diff --git a/openvdb/openvdb/unittest/TestTree.cc b/openvdb/openvdb/unittest/TestTree.cc index 59e6dfff93..74ec5d63ab 100644 --- a/openvdb/openvdb/unittest/TestTree.cc +++ b/openvdb/openvdb/unittest/TestTree.cc @@ -2840,7 +2840,6 @@ TEST_F(TestTree, testRootNode) } } -#if OPENVDB_ABI_VERSION_NUMBER >= 9 { // test transient data RootNodeType rootNode(0.0f); EXPECT_EQ(openvdb::Index32(0), rootNode.transientData()); @@ -2851,7 +2850,6 @@ TEST_F(TestTree, testRootNode) RootNodeType rootNode3 = rootNode; EXPECT_EQ(openvdb::Index32(5), rootNode3.transientData()); } -#endif } TEST_F(TestTree, testInternalNode) @@ -2947,7 +2945,6 @@ TEST_F(TestTree, testInternalNode) delete child; } -#if OPENVDB_ABI_VERSION_NUMBER >= 9 { // test transient data InternalNodeType internalNode(c1, 0.0f); EXPECT_EQ(openvdb::Index32(0), internalNode.transientData()); @@ -2958,5 +2955,4 @@ TEST_F(TestTree, testInternalNode) InternalNodeType internalNode3 = internalNode; EXPECT_EQ(openvdb::Index32(5), internalNode3.transientData()); } -#endif } diff --git a/openvdb/openvdb/version.h.in b/openvdb/openvdb/version.h.in index 897d649bac..9a95b8d3a5 100644 --- a/openvdb/openvdb/version.h.in +++ b/openvdb/openvdb/version.h.in @@ -169,9 +169,9 @@ // This can be suppressed by defining OPENVDB_USE_FUTURE_ABI_=ON. // Note that, whilst the VDB CMake does not allow this option to be hit, // it exists to propagate this message to downstream targets - #if OPENVDB_ABI_VERSION_NUMBER == 11 - #ifndef OPENVDB_USE_FUTURE_ABI_11 - PRAGMA(message("NOTE: ABI = 11 is still in active development and has not been finalized, " + #if OPENVDB_ABI_VERSION_NUMBER == 12 + #ifndef OPENVDB_USE_FUTURE_ABI_12 + PRAGMA(message("NOTE: ABI = 12 is still in active development and has not been finalized, " "define OPENVDB_USE_FUTURE_ABI_11 to suppress this message")) #endif #else @@ -183,15 +183,15 @@ // directive. This can be suppressed by defining OPENVDB_USE_DEPRECATED_ABI_. // Note that, whilst the VDB CMake does not allow this option to be hit, // it exists to propagate this message to downstream targets -#ifndef OPENVDB_USE_DEPRECATED_ABI_8 - #if OPENVDB_ABI_VERSION_NUMBER == 8 - PRAGMA(message("NOTE: ABI = 8 is deprecated, define OPENVDB_USE_DEPRECATED_ABI_7 " +#ifndef OPENVDB_USE_DEPRECATED_ABI_9 + #if OPENVDB_ABI_VERSION_NUMBER == 9 + PRAGMA(message("NOTE: ABI = 9 is deprecated, define OPENVDB_USE_DEPRECATED_ABI_9 " "to suppress this message")) #endif #endif -#ifndef OPENVDB_USE_DEPRECATED_ABI_9 - #if OPENVDB_ABI_VERSION_NUMBER == 9 - PRAGMA(message("NOTE: ABI = 9 is deprecated, define OPENVDB_USE_DEPRECATED_ABI_8 " +#ifndef OPENVDB_USE_DEPRECATED_ABI_10 + #if OPENVDB_ABI_VERSION_NUMBER == 10 + PRAGMA(message("NOTE: ABI = 10 is deprecated, define OPENVDB_USE_DEPRECATED_ABI_10 " "to suppress this message")) #endif #endif diff --git a/openvdb_ax/openvdb_ax/compiler/PointExecutable.cc b/openvdb_ax/openvdb_ax/compiler/PointExecutable.cc index 88675fe474..c84a12c9b3 100644 --- a/openvdb_ax/openvdb_ax/compiler/PointExecutable.cc +++ b/openvdb_ax/openvdb_ax/compiler/PointExecutable.cc @@ -358,7 +358,6 @@ struct PointFunctionArguments // @todo if the array is shared we should probably make it unique? -#if OPENVDB_ABI_VERSION_NUMBER >= 9 if (mData.mUseBufferKernel) { const_cast(array).loadData(); const char* data = array.constDataAsByteArray(); @@ -373,12 +372,6 @@ struct PointFunctionArguments mHandlesOrBuffers.emplace_back(handle->mHandle.get()); mAttributeHandles.emplace_back(std::move(handle)); } -#else - assert(!mData.mUseBufferKernel); - typename ReadHandle::UniquePtr handle(new ReadHandle(leaf, Index(pos))); - mHandlesOrBuffers.emplace_back(handle->mHandle.get()); - mAttributeHandles.emplace_back(std::move(handle)); -#endif mFlags.emplace_back(flag); } @@ -390,7 +383,6 @@ struct PointFunctionArguments points::AttributeArray& array = leaf.attributeArray(pos); array.expand(); -#if OPENVDB_ABI_VERSION_NUMBER >= 9 if (mData.mUseBufferKernel) { array.loadData(); const char* data = array.constDataAsByteArray(); @@ -406,12 +398,6 @@ struct PointFunctionArguments mHandlesOrBuffers.emplace_back(handle->mHandle.get()); mAttributeHandles.emplace_back(std::move(handle)); } -#else - assert(!mData.mUseBufferKernel); - typename WriteHandle::UniquePtr handle(new WriteHandle(leaf, Index(pos))); - mHandlesOrBuffers.emplace_back(handle->mHandle.get()); - mAttributeHandles.emplace_back(std::move(handle)); -#endif mFlags.emplace_back(flag); } @@ -866,7 +852,6 @@ void PointExecutable::execute(openvdb::points::PointDataGrid& grid) const // Compute whether we can use the accelerated kernel // @note Assumes attributes are valid (i.e. has errored out if they are not) -#if OPENVDB_ABI_VERSION_NUMBER >= 9 if (!usingGroup) { const auto& desc = leafIter->attributeSet().descriptor(); data.mUseBufferKernel = checkCodecs(desc, *mAttributeRegistry, @@ -877,10 +862,6 @@ void PointExecutable::execute(openvdb::points::PointDataGrid& grid) const // if a group has been specified we can't use the buffer range yet data.mUseBufferKernel = false; } -#else - // can't access data buffers until ABI >= 9 - data.mUseBufferKernel = false; -#endif // execute diff --git a/openvdb_cmd/vdb_render/CMakeLists.txt b/openvdb_cmd/vdb_render/CMakeLists.txt index 1fd9e161e4..403aa8bd7f 100644 --- a/openvdb_cmd/vdb_render/CMakeLists.txt +++ b/openvdb_cmd/vdb_render/CMakeLists.txt @@ -17,22 +17,11 @@ if(USE_PNG) endif() if(USE_IMATH_HALF) - find_package(Imath CONFIG) - if (NOT TARGET Imath::Imath) - if(USE_EXR) - find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half Iex IlmThread Imath) - else() - find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half) - endif() - endif() + find_package(Imath CONFIG REQUIRED) endif() if(USE_EXR) - if (NOT TARGET Imath::Imath) - find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED COMPONENTS IlmImf) - else() - find_package(OpenEXR CONFIG REQUIRED) - endif() + find_package(OpenEXR CONFIG REQUIRED) endif() set(SOURCE_FILES main.cc) @@ -58,27 +47,8 @@ target_link_libraries(vdb_render $ $ $ - # For IlmBase/OpenEXR v2.X - $ - $ - $ - $ - $ - $ ${OPENVDB_BINARIES_DEPENDENT_LIBS} $ ) -if(WIN32) - # @note OPENVDB_OPENEXR_STATICLIB is old functionality and should be removed - if (TARGET Imath::Imath) - get_target_property(ILMBASE_LIB_TYPE Imath::Imath TYPE) - else() - get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE) - endif() - if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY)) - target_compile_definitions(vdb_render PUBLIC -DOPENVDB_OPENEXR_STATICLIB) - endif() -endif() - install(TARGETS vdb_render RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Merge.cc b/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Merge.cc index 6c379f2bfe..90ccc27ed2 100644 --- a/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Merge.cc +++ b/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Merge.cc @@ -391,12 +391,7 @@ struct MergeOp auto hasUniqueTree = [&](GU_PrimVDB* vdbPrim) { -#if OPENVDB_ABI_VERSION_NUMBER >= 8 return vdbPrim->getConstGridPtr()->isTreeUnique(); -#else - const TreeBase::ConstPtr treeBaseConstPtr = vdbPrim->getConstGridPtr()->constBaseTreePtr(); - return treeBaseConstPtr.use_count() <= 2; -#endif }; auto stealTree = [&](auto& gridBase, GU_PrimVDB* vdbPrim = nullptr) @@ -480,12 +475,7 @@ struct MergeOp auto hasUniqueTree = [&](GU_PrimVDB* vdbPrim) { -#if OPENVDB_ABI_VERSION_NUMBER >= 8 return vdbPrim->getConstGridPtr()->isTreeUnique(); -#else - const TreeBase::ConstPtr treeBaseConstPtr = vdbPrim->getConstGridPtr()->constBaseTreePtr(); - return treeBaseConstPtr.use_count() <= 2; -#endif }; auto stealTree = [&](auto& gridBase, GU_PrimVDB* vdbPrim = nullptr) diff --git a/pendingchanges/vdb11.txt b/pendingchanges/vdb11.txt new file mode 100644 index 0000000000..6bada32357 --- /dev/null +++ b/pendingchanges/vdb11.txt @@ -0,0 +1,2 @@ +Build: + - Support for OpenEXR 2.X has been removed.