Skip to content

Commit

Permalink
VFX2024 - Add support for Boost 1.82 (#478)
Browse files Browse the repository at this point in the history
### VFX2024 - Add support for Boost 1.82

### Linked issues
#366 

### Summarize your change.
Add support for Boost 1.82 to follow VFX 2024.

### Describe the reason for the change.
Add support for Boost 1.82 to follow VFX 2024.

### Describe what you have tested and on which operating system.
MacOS

### Add a list of changes, and note any that might need special
attention during the review.

### If possible, provide screenshots.

---------

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
  • Loading branch information
cedrik-fuoco-adsk authored Aug 21, 2024
1 parent 0c60e27 commit 3967235
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 40 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#
# SPDX-License-Identifier: Apache-2.0
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.24)

# Need 3.27 for Boost 1.82 (FindBoost.cmake).
CMAKE_MINIMUM_REQUIRED(VERSION 3.27)

# These variables are parsed by sphinx for the documentation. One-line formatting facilitates parsing and readability.
# cmake-format: off
Expand Down
97 changes: 58 additions & 39 deletions cmake/dependencies/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,18 @@
# SPDX-License-Identifier: Apache-2.0
#

# IMPORTANT: CMake minimum version need to be increased everytime Boost version is increased.
# e.g. CMake 3.27 is needed for Boost 1.82 to be found by FindBoost.cmake.
#
# Starting from CMake 3.30, FindBoost.cmake has been removed in favor of BoostConfig.cmake (Boost 1.70+).
# This behavior is covered by CMake policy CMP0167.

INCLUDE(ProcessorCount) # require CMake 3.15+
PROCESSORCOUNT(_cpu_count)

# This should handle fetching or checking then compiling required 3rd party dependencies
SET(_target
"RV_DEPS_BOOST"
)

# This version of boost resolves Python3 compatibilty issues on Big Sur and Monterey and is compatible with Python 2.7 through Python 3.10
SET(_version
"1.80.0"
)

SET(_major_minor_version
"1_80"
)

SET(_download_hash
077f074743ea7b0cb49c6ed43953ae95
)

# Note: Boost 1.80 cannot be built with XCode 15 which is now the only XCode version available on macOS Sonoma without a hack. Boost 1.81 has all the fixes
# required to be able to be built with XCode 15, however it is not VFX Platform CY2023 compliant which specifies Boost version 1.80. With the aim of making the
# OpenRV build on macOS smoother by default, we will use Boost 1.81 if XCode 15 or more recent.
# Note: Boost 1.80 cannot be built with XCode 15 which is now the only XCode version available on macOS Sonoma without a hack.
# Boost 1.81+ has all the fixes required to be able to be built with XCode 15, however it is not VFX Platform CY2023 compliant which specifies Boost version 1.80.
# With the aim of making the OpenRV build on macOS smoother by default, OpenRV will use Boost 1.81 if XCode 15 or more recent.
IF(RV_TARGET_DARWIN)
EXECUTE_PROCESS(
COMMAND xcrun clang --version
Expand All @@ -41,21 +29,59 @@ IF(RV_TARGET_DARWIN)
MESSAGE(STATUS "Clang version ${CLANG_VERSION_STRING} is not compatible with Boost 1.80, using Boost 1.81 instead. "
"Install XCode 14.3.1 if you absolutely want to use Boost version 1.80 as per VFX reference platform CY2023"
)
SET(_BOOST_DETECTED_XCODE_15_ ON)
ENDIF()
ENDIF()

SET(_version
"1.81.0"
)
# Set some variables for VFX2024 since those value are used at two locations.
SET(_BOOST_VFX2024_VERSION_ "1.82.0")
SET(_BOOST_VFX2024_MAJOR_MINOR_VERSION_ "1_82")
SET(_BOOST_VFX2024_DOWNLOAD_HASH_ "f7050f554a65f6a42ece221eaeec1660")

IF (NOT _BOOST_DETECTED_XCODE_15_)
# XCode 14 and below.
RV_VFX_SET_VARIABLE(
_ext_boost_version
CY2023 "1.80.0"
CY2024 "${_BOOST_VFX2024_VERSION_}"
)

SET(_major_minor_version
"1_81"
)
RV_VFX_SET_VARIABLE(
_major_minor_version
CY2023 "1_80"
CY2024 "${_BOOST_VFX2024_MAJOR_MINOR_VERSION_}"
)

SET(_download_hash
4bf02e84afb56dfdccd1e6aec9911f4b
)
ENDIF()
RV_VFX_SET_VARIABLE(
_download_hash
CY2023 "077f074743ea7b0cb49c6ed43953ae95"
CY2024 "${_BOOST_VFX2024_DOWNLOAD_HASH_}"
)
ELSE()
# XCode 15 and above. (Need Boost 1.81+)
RV_VFX_SET_VARIABLE(
_ext_boost_version
# Use Boost 1.81.0 for VFX2023 (Boost 1.80.0 does not work with XCode 15)
CY2023 "1.81.0"
CY2024 "${_BOOST_VFX2024_VERSION_}"
)

RV_VFX_SET_VARIABLE(
_major_minor_version
CY2023 "1_81"
CY2024 "${_BOOST_VFX2024_MAJOR_MINOR_VERSION_}"
)

RV_VFX_SET_VARIABLE(
_download_hash
CY2023 "4bf02e84afb56dfdccd1e6aec9911f4b"
CY2024 "${_BOOST_VFX2024_DOWNLOAD_HASH_}"
)
ENDIF()

RV_CREATE_STANDARD_DEPS_VARIABLES("RV_DEPS_BOOST" "${_ext_boost_version}" "" "")
RV_SHOW_STANDARD_DEPS_VARIABLES()

STRING(REPLACE "." "_" _version_with_underscore ${_version})
SET(_download_url
"https://archives.boost.io/release/${_version}/source/boost_${_version_with_underscore}.tar.gz"
Expand Down Expand Up @@ -304,16 +330,9 @@ ADD_CUSTOM_TARGET(
DEPENDS ${_boost_stage_output}
)

ADD_CUSTOM_TARGET(
clean-${_target}
COMMENT "Cleaning '${_target}' ..."
COMMAND ${CMAKE_COMMAND} -E remove_directory ${_base_dir}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${RV_DEPS_BASE_DIR}/cmake/dependencies/${_target}-prefix
)

ADD_DEPENDENCIES(dependencies ${_target}-stage-target)

SET(RV_DEPS_BOOST_VERSION
${_version}
CACHE INTERNAL "" FORCE
)
)
3 changes: 3 additions & 0 deletions src/lib/app/PyMediaLibrary/PyRootNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

#include <Python.h>

#include <array>
#include <string_view>

namespace
{
static ENVVAR_BOOL( evUseMediaLibraryPlugins, "RV_USE_MEDIA_LIBRARY_PLUGINS",
Expand Down

0 comments on commit 3967235

Please sign in to comment.