Skip to content

Commit b7a111c

Browse files
valgurAhajha
authored andcommitted
(conan-io#18891) openvdb: migrate to Conan v2
* openvdb: migrate to Conan v2 * openvdb: the patch is no longer required * openvdb: add v8.2.0 Newer versions require considerable amounts of memory to build, probably too much for the CI. More than 1.5 GB per core. * openvdb: bump deps, use cache_variables * openvdb: remove broken minimum TBB version check * openvdb: enable v9, v10, expose all available options, fix imath use * openvdb: add and disable use_explicit_instantiation to limit memory usage during build * openvdb: disable options not available in older versions * openvdb: require flex and bison for build_ax * openvdb: backport a bugfix for a build issue * openvdb: bump versions * openvdb: openexr requires transitive_libs=True * openvdb: use imath instead of openexr for newer versions * openvdb: use strict version checking * openvdb: set use_imath_half=True To fix error LNK2001: unresolved external symbol "__declspec(dllimport) private: static unsigned short const * const half::_eLut" etc on MSVC. * openvdb: bump deps * openvdb: add v10.1.0 * openvdb: drop v8.0.1 * openvdb: add v11.0.0 * openvdb: fix C++ standard in test_package * openvdb: drop v8 * openvdb: enable log4cplus by default, bump deps * openvdb: deprecation warning for with_exr * openvdb: disable log4cplus * openvdb: don't need cache_variables
1 parent 955ff77 commit b7a111c

File tree

9 files changed

+274
-200
lines changed

9 files changed

+274
-200
lines changed

recipes/openvdb/all/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

recipes/openvdb/all/conandata.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
sources:
2-
"8.0.1":
3-
url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v8.0.1.tar.gz"
4-
sha256: "a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f"
5-
patches:
6-
"8.0.1":
7-
- patch_file: "patches/0001-Find-packages-fixes.patch"
8-
base_path: "source_subfolder"
2+
"11.0.0":
3+
url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v11.0.0.tar.gz"
4+
sha256: "6314ff1db057ea90050763e7b7d7ed86d8224fcd42a82cdbb9c515e001b96c74"
5+
"10.1.0":
6+
url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v10.1.0.tar.gz"
7+
sha256: "2746236e29659a0d35ab90d832f7c7987dd2537587a1a2f9237d9c98afcd5817"
8+
"9.1.0":
9+
url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v9.1.0.tar.gz"
10+
sha256: "914ee417b4607c75c95b53bc73a0599de4157c7d6a32e849e80f24e40fb64181"

recipes/openvdb/all/conanfile.py

Lines changed: 214 additions & 160 deletions
Large diffs are not rendered by default.

recipes/openvdb/all/patches/0001-Find-packages-fixes.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.15)
22
project(test_package CXX)
33

4-
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
5-
conan_basic_setup(TARGETS)
6-
7-
find_package(OpenVDB REQUIRED)
4+
find_package(OpenVDB REQUIRED CONFIG)
85

96
add_executable(${PROJECT_NAME} test_package.cpp)
107
target_link_libraries(${PROJECT_NAME} PRIVATE OpenVDB::openvdb)
11-
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
8+
if (OpenVDB_VERSION VERSION_GREATER_EQUAL "10.0.0")
9+
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
10+
else()
11+
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
12+
endif()
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
from conans import ConanFile, CMake, tools
1+
from conan import ConanFile
2+
from conan.tools.build import can_run
3+
from conan.tools.cmake import cmake_layout, CMake
24
import os
35

46

57
class TestPackageConan(ConanFile):
68
settings = "os", "arch", "compiler", "build_type"
7-
generators = "cmake", "cmake_find_package"
9+
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
10+
test_type = "explicit"
11+
12+
def requirements(self):
13+
self.requires(self.tested_reference_str)
14+
15+
def layout(self):
16+
cmake_layout(self)
817

918
def build(self):
1019
cmake = CMake(self)
1120
cmake.configure()
1221
cmake.build()
1322

1423
def test(self):
15-
if not tools.cross_building(self):
16-
bin_path = os.path.join("bin", "test_package")
17-
self.run(bin_path, run_environment=True)
24+
if can_run(self):
25+
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
26+
self.run(bin_path, env="conanrun")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
project(test_package)
3+
4+
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
5+
conan_basic_setup(TARGETS)
6+
7+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/
8+
${CMAKE_CURRENT_BINARY_DIR}/test_package/)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from conans import ConanFile, CMake, tools
2+
import os
3+
4+
5+
class TestPackageConan(ConanFile):
6+
settings = "os", "arch", "compiler", "build_type"
7+
generators = "cmake", "cmake_find_package_multi"
8+
9+
def build(self):
10+
cmake = CMake(self)
11+
cmake.configure()
12+
cmake.build()
13+
14+
def test(self):
15+
if not tools.cross_building(self):
16+
bin_path = os.path.join("bin", "test_package")
17+
self.run(bin_path, run_environment=True)

recipes/openvdb/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
versions:
2-
"8.0.1":
2+
"11.0.0":
3+
folder: all
4+
"10.1.0":
5+
folder: all
6+
"9.1.0":
37
folder: all

0 commit comments

Comments
 (0)