Skip to content

Commit 338b6a9

Browse files
committed
Removed DISABLE_DEPENDENCY_VERSION_CHECKS with boost::python targets and added cmake messages
Signed-off-by: Nick Avramoussis <[email protected]>
1 parent 516ec15 commit 338b6a9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

openvdb/openvdb/python/CMakeLists.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,10 @@ endif()
157157
# Newer boost versions now seems to say that the suffixing is only required if
158158
# you have multiple boost installations, however the CMake implementation still
159159
# requires it. Boost specifically reads from Boost_PYTHON_VERSION and
160-
# Boost_PYTHON_VERSION_MAJOR variables. If the user has set these or
161-
# DISABLE_DEPENDENCY_VERSION_CHECKS is defined, we just search for the non
162-
# suffixed versions. Note that users can also provide Boost_NO_BOOST_CMAKE to
163-
# skip the CMake implementation of FindBoost, though this will impact other
164-
# boost components.
160+
# Boost_PYTHON_VERSION_MAJOR variables. If the user has set these we just
161+
# search for the non suffixed versions. Note that users can also provide
162+
# Boost_NO_BOOST_CMAKE to skip the CMake implementation of FindBoost, though
163+
# this will impact other boost components.
165164
#
166165
# @todo just get rid of boost python and migrate to pybind asap.
167166

@@ -170,9 +169,8 @@ if(USE_NUMPY)
170169
list(APPEND _REQUIRED_BOOST_COMPONENTS numpy)
171170
endif()
172171

173-
if(DISABLE_DEPENDENCY_VERSION_CHECKS OR
174-
Boost_PYTHON_VERSION OR
175-
Boost_PYTHON_VERSION_MAJOR)
172+
if(Boost_PYTHON_VERSION OR
173+
Boost_PYTHON_VERSION_MAJOR)
176174
# Search for non-suffixed boost libraries
177175
find_package(Boost ${MINIMUM_BOOST_VERSION} COMPONENTS ${_REQUIRED_BOOST_COMPONENTS} REQUIRED)
178176
else()
@@ -220,12 +218,16 @@ if(TARGET Boost::python${Python_VERSION_MAJOR}${Python_VERSION_MINOR})
220218
list(APPEND OPENVDB_PYTHON_DEPS Boost::python${Python_VERSION_MAJOR}${Python_VERSION_MINOR})
221219
elseif(TARGET Boost::python)
222220
list(APPEND OPENVDB_PYTHON_DEPS Boost::python)
221+
message(STATUS "Found non-suffixed boost_python, assuming to be python version "
222+
"\"${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}\" compatible")
223223
endif()
224224

225225
if(TARGET Boost::numpy${Python_VERSION_MAJOR}${Python_VERSION_MINOR})
226226
list(APPEND OPENVDB_PYTHON_DEPS Boost::numpy${Python_VERSION_MAJOR}${Python_VERSION_MINOR})
227227
elseif(TARGET Boost::numpy)
228228
list(APPEND OPENVDB_PYTHON_DEPS Boost::numpy)
229+
message(STATUS "Found non-suffixed boost_numpy, assuming to be python version "
230+
"\"${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}\" compatible")
229231
endif()
230232

231233
##########################################################################

0 commit comments

Comments
 (0)