Skip to content

Commit e718169

Browse files
authored
Merge pull request #515 from Idclip/vfx_18_cmake_deprecations
CMake deprecation warnings for VFX 18 versions
2 parents 1e6f36f + ebbeb02 commit e718169

File tree

6 files changed

+49
-0
lines changed

6 files changed

+49
-0
lines changed

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ Version 6.2.0 - In development
3232
- Added an OPENVDB_CODE_COVERAGE option to CMake.
3333
- CMake now automatically detects and configures the CXX11 ABI requirement
3434
for Houdini builds.
35+
- CMake now issues deprecation warnings for 2017 VFX Reference Platform
36+
version dependencies. In particular, C++11-only compilers are now
37+
deprecated; OpenVDB 7.0 will require a C++14-compatible compiler.
3538

3639
Bug fixes:
3740
- Replaced std::vector with std::deque as the underlying container

CMakeLists.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,25 @@ if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS)
212212
set(MINIMUM_DOXYGEN_VERSION 1.8.8)
213213
endif()
214214

215+
# VFX 18 deprecations to transition to MINIMUM_* variables in OpenVDB 7.0.0
216+
217+
set(FUTURE_MINIMUM_CMAKE_VERSION 3.12)
218+
set(FUTURE_MINIMUM_GCC_VERSION 6.3.1)
219+
set(FUTURE_MINIMUM_ICC_VERSION 17)
220+
set(FUTURE_MINIMUM_MSVC_VERSION 19.10)
221+
set(FUTURE_MINIMUM_TBB_VERSION 2017.6)
222+
set(FUTURE_MINIMUM_NUMPY_VERSION 1.12.1)
223+
set(FUTURE_MINIMUM_HOUDINI_VERSION 17)
224+
215225
#########################################################################
216226

217227
# General CMake and CXX settings
218228

229+
if(${CMAKE_VERSION} VERSION_LESS ${FUTURE_MINIMUM_CMAKE_VERSION})
230+
message(DEPRECATION "Support for CMake versions < ${FUTURE_MINIMUM_CMAKE_VERSION} "
231+
"is deprecated and will be removed.")
232+
endif()
233+
219234
set(CMAKE_CXX_STANDARD 11)
220235
set(CMAKE_CXX_STANDARD_REQUIRED ON)
221236
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -407,6 +422,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
407422
"\"${MINIMUM_GCC_VERSION}\". Found version \"${CMAKE_CXX_COMPILER_VERSION}\""
408423
)
409424
endif()
425+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS FUTURE_MINIMUM_GCC_VERSION)
426+
message(DEPRECATION "Support for GCC versions < ${FUTURE_MINIMUM_GCC_VERSION} "
427+
"is deprecated and will be removed.")
428+
endif()
410429
if(OPENVDB_CXX_STRICT)
411430
message(STATUS "Configuring GCC CXX warnings")
412431
set(HAS_AVAILABLE_WARNINGS TRUE)
@@ -432,7 +451,15 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
432451
"\"${MINIMUM_ICC_VERSION}\". Found version \"${CMAKE_CXX_COMPILER_VERSION}\""
433452
)
434453
endif()
454+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS FUTURE_MINIMUM_ICC_VERSION)
455+
message(DEPRECATION "Support for ICC versions < ${FUTURE_MINIMUM_ICC_VERSION} "
456+
"is deprecated and will be removed.")
457+
endif()
435458
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
459+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS FUTURE_MINIMUM_MSVC_VERSION)
460+
message(DEPRECATION "Support for MSVC versions < ${FUTURE_MINIMUM_MSVC_VERSION} "
461+
"is deprecated and will be removed.")
462+
endif()
436463
# Increase the number of sections that an object file can contain
437464
add_definitions("/bigobj")
438465
endif()

cmake/OpenVDBHoudiniSetup.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ if(Houdini_VERSION VERSION_LESS 17)
181181
endfunction()
182182
endif()
183183

184+
if(Houdini_VERSION VERSION_LESS ${FUTURE_MINIMUM_HOUDINI_VERSION})
185+
message(DEPRECATION "Support for Houdini versions < ${FUTURE_MINIMUM_HOUDINI_VERSION} "
186+
"is deprecated and will be removed.")
187+
endif()
188+
184189
# ------------------------------------------------------------------------
185190
# Configure imported Houdini target
186191
# ------------------------------------------------------------------------

doc/changes.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Improvements:
4444
- Added an @c OPENVDB_CODE_COVERAGE option to CMake.
4545
- CMake now automatically detects and configures the CXX11 ABI requirement
4646
for Houdini builds.
47+
- CMake now issues deprecation warnings for 2017 VFX Reference Platform
48+
version dependencies. In particular, C++11-only compilers are now
49+
deprecated; OpenVDB&nbsp;7.0 will require a C++14-compatible compiler.
4750

4851
@par
4952
Bug fixes:

openvdb/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ else()
7878
endif()
7979

8080
find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbb)
81+
if(${Tbb_VERSION} VERSION_LESS FUTURE_MINIMUM_TBB_VERSION)
82+
message(DEPRECATION "Support for TBB versions < ${FUTURE_MINIMUM_TBB_VERSION} "
83+
"is deprecated and will be removed.")
84+
endif()
85+
8186
find_package(ZLIB ${MINIMUM_ZLIB_VERSION} REQUIRED)
8287

8388
if(USE_LOG4CPLUS)

openvdb/python/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ else()
108108
list(APPEND OPENVDB_PYTHON_DEPS Python::Python)
109109
endif()
110110

111+
if(USE_NUMPY)
112+
if(Python_NumPy_VERSION VERSION_LESS FUTURE_MINIMUM_NUMPY_VERSION)
113+
message(DEPRECATION "Support for NumPy versions < ${FUTURE_MINIMUM_NUMPY_VERSION} "
114+
"is deprecated and will be removed.")
115+
endif()
116+
endif()
111117

112118
# Boost python handling - try and find both python and pythonXx (version suffixed).
113119
# Prioritize the version suffixed library, failing if neither exist.

0 commit comments

Comments
 (0)