Skip to content

build: Protect against mismatch of OpenVDB vs C++ #4023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
* OpenJpeg >= 2.0 (tested through 2.5; we recommend 2.4 or higher
for multithreading support)
* If you want support for OpenVDB files:
* OpenVDB >= 5.0 (tested through 10.0)
* OpenVDB >= 5.0 (tested through 10.1). Note that using OpenVDB >= 10.0
requires that you compile OIIO with C++17 or higher.
* If you want to use TBB as the thread pool:
* TBB >= 2018 (tested through 2021 and OneTBB)
* If you want support for converting to and from OpenCV data structures,
Expand Down
4 changes: 4 additions & 0 deletions src/cmake/externalpackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ checked_find_package (OpenVDB
VERSION_MIN 5.0
DEPS TBB
DEFINITIONS -DUSE_OPENVDB=1)
if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.0 AND CMAKE_CXX_STANDARD VERSION_LESS 17)
message (WARNING "${ColorYellow}OpenVDB >= 10.0 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}")
set (OpeVDB_FOUND 0)
endif ()

checked_find_package (Ptex PREFER_CONFIG)
if (NOT Ptex_FOUND OR NOT Ptex_VERSION)
Expand Down