Alembic: force ALEMBIC_LIB_USES_BOOST=ON when not using C++11
authorSybren A. Stüvel <sybren@stuvel.eu>
Thu, 16 Feb 2017 09:59:19 +0000 (10:59 +0100)
committerSybren A. Stüvel <sybren@stuvel.eu>
Tue, 4 Apr 2017 10:41:44 +0000 (12:41 +0200)
Alembic requires one of ALEMBIC_LIB_USES_BOOST, ALEMBIC_LIB_USES_TR1, or
C++11, and silently defaults to the latter if the former two are OFF.

Before this change, Alembic was only built without C++11 of OpenEXR
was built at the same time. This dependency was both unnecessary and
undocumented.

build_files/build_environment/install_deps.sh

index ed1b9a3e62ab67743b50a952dbf2e1a33f22aeed..08cb68228104ff7096ca0ceeff67c2f60fd2f880 100755 (executable)
@@ -2266,6 +2266,12 @@ compile_ALEMBIC() {
 
     cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
 
+    # Without Boost or TR1, Alembic requires C++11.
+    if [ "$USE_CXX11" != true ]; then
+      cmake_d="$cmake_d -D ALEMBIC_LIB_USES_BOOST=ON"
+      cmake_d="$cmake_d -D ALEMBIC_LIB_USES_TR1=OFF"
+    fi
+
     if [ -d $INST/boost ]; then
       cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost"
       cmake_d="$cmake_d -D USE_STATIC_BOOST=ON"
@@ -2285,8 +2291,6 @@ compile_ALEMBIC() {
       cmake_d="$cmake_d -D USE_STATIC_HDF5=OFF"
       cmake_d="$cmake_d -D ALEMBIC_ILMBASE_LINK_STATIC=OFF"
       cmake_d="$cmake_d -D ALEMBIC_SHARED_LIBS=OFF"
-      cmake_d="$cmake_d -D ALEMBIC_LIB_USES_BOOST=ON"
-      cmake_d="$cmake_d -D ALEMBIC_LIB_USES_TR1=OFF"
       INFO "ILMBASE_ROOT=$INST/openexr"
     fi