-
Notifications
You must be signed in to change notification settings - Fork 726
Description
Environment
Windows 10, x64
VisualStudio 2022.
CMake 4.0.2
Describe the bug
CMake can not detect the TBB package.
OpenVDB provides cmake\FindTBB.cmake which is not finding TBB
At least CMake 4.0.2 comes with another version of FindTBB.cmake that does work.
Removing the the OpenVDB version of this script solves the problem.
But the problem is persisting. Running a 'Install' after a succefull build fails because cmake\FindTBB.cmake is part of the installment.
I'm just signaling the problem and what I have done with it. In no way I can oversee all implications, I'm not an expert in CMake and for another progran just need to have OpenVDB.
It is not possible for me to make a pull request.
To Reproduce
- Checkout the latest version
- Run CMake.exe
CMAKE_PREFIX_PATH=h:/lib/Boost;h:/lib/zlib;h:/lib/TBB\oneapi-tbb-2022.3.0
cmake.exe -S ./openvdb-13_0_0 -B c:/Spool/CMake/OpenVDB/_build_13_0_0 --fresh -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.19045.
-- The CXX compiler identification is MSVC 19.44.35217.0
...
-- Found ZLIB: H:/lib/zlib/lib/zd.lib (found version "1.3.1.1")
CMake Error at C:/Program Files/CMake/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
Could NOT find TBB (missing: Tbb_LIB_COMPONENTS tbb) (found suitable
version "2022.3", minimum required is "2020.3")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
cmake/FindTBB.cmake:370 (find_package_handle_standard_args)
openvdb/openvdb/CMakeLists.txt:132 (find_package)
-- Configuring incomplete, errors occurred!
Expected behavior (with cmake\FindTBB.cmake removed)
CMAKE_PREFIX_PATH=h:/lib/Boost;h:/lib/zlib;h:/lib/TBB\oneapi-tbb-2022.3.0;h:/lib/Blosc
cmake.exe -S ./openvdb-13_0_0 -B c:/Spool/CMake/OpenVDB/_build_13_0_0 -DCMAKE_INSTALL_PREFIX=h:/lib/OpenVDB --fresh -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.19045.
-- The CXX compiler identification is MSVC 19.44.35217.0
...
-- Found ZLIB: H:/lib/zlib/lib/zd.lib (found suitable version "1.3.1.1", minimum required is "1.2.7")
-- ----------- Configuring OpenVDBBinaries ------------
-- Configuring done (15.5s)
-- Generating done (1.0s)
-- Build files have been written to: C:/Spool/CMake/OpenVDB/_build_13_0_0
CMake build=c:/Spool/CMake/OpenVDB/_build_13_0_0