build_environment: opensubdiv 3.3.3 with PR975 + TBB 2018_U5
authorRay Molenkamp <github@lazydodo.com>
Tue, 14 Aug 2018 01:08:28 +0000 (19:08 -0600)
committerRay Molenkamp <github@lazydodo.com>
Tue, 14 Aug 2018 01:08:28 +0000 (19:08 -0600)
build_files/build_environment/cmake/harvest.cmake
build_files/build_environment/cmake/opensubdiv.cmake
build_files/build_environment/cmake/tbb.cmake
build_files/build_environment/cmake/versions.cmake
build_files/build_environment/patches/opensubdiv.diff

index b5b9eef7bb206c132a4d3fd32c8f5a0dbd4f8e1c..f346429dfbfed50c2350659fbb13c94c761b82d3 100644 (file)
@@ -65,13 +65,8 @@ if(BUILD_MODE STREQUAL Release)
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl &&
                                # OpenVDB
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openVDB/ ${HARVEST_TARGET}/openVDB &&
-                               # tbb
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ &&
                                # opencollada
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ &&
-                               # opensubdiv
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv ${HARVEST_TARGET}/opensubdiv &&
                                # BlendThumb
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
@@ -104,11 +99,6 @@ if(BUILD_MODE STREQUAL Debug)
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib &&
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib &&
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib &&
-                               # opensubdiv
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib &&
-                               # tbb
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib &&
                                # openvdb
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib &&
                                # python
index 930ef4e6ed3a7ad09fdee34ff00a9ee73df824f5..1db3b11de9a6708f4a111abbdaf74eaada1270a6 100644 (file)
@@ -33,16 +33,11 @@ set(OPENSUBDIV_EXTRA_ARGS
 )
 
 if(WIN32)
-       #no cuda support for vc15 yet
-       if(msvc15)
-               set(OPENSUBDIV_CUDA ON)
-       else()
-               set(OPENSUBDIV_CUDA ON)
-       endif()
-
        set(OPENSUBDIV_EXTRA_ARGS
                ${OPENSUBDIV_EXTRA_ARGS}
-               -DNO_CUDA=${OPENSUBDIV_CUDA}
+               -DNO_CUDA=Off
+               -DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
+               -DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
                -DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
                -DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
                -DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
@@ -69,10 +64,28 @@ ExternalProject_Add(external_opensubdiv
        INSTALL_DIR ${LIBDIR}/opensubdiv
 )
 
+if(WIN32)
+       if(BUILD_MODE STREQUAL Release)
+               ExternalProject_Add_Step(external_opensubdiv after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
+                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
+                       DEPENDEES install
+               )
+       endif()
+       if(BUILD_MODE STREQUAL Debug)
+               ExternalProject_Add_Step(external_opensubdiv after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
+                       DEPENDEES install
+               )
+       endif() 
+endif()
+
 add_dependencies(
        external_opensubdiv
        external_glew
        external_glfw
        external_clew
        external_cuew
+       external_tbb
 )
index fa5c9029ed06891bb08f39db62600e7ab25e1508..4e0357da8bbd114de6d9d661fa87ffc40bbfb311 100644 (file)
@@ -23,14 +23,6 @@ set(TBB_EXTRA_ARGS
        -DTBB_BUILD_STATIC=On
 )
 
-if(TBB_VERSION MATCHES 2018)
-       set(TBB_VS_VERSION vs2013)
-elseif(TBB_VERSION MATCHES 2017)
-       set(TBB_VS_VERSION vs2012)
-else()
-       set(TBB_VS_VERSION vs2010)
-endif()
-
 # CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
 ExternalProject_Add(external_tbb
        URL ${TBB_URI}
@@ -38,7 +30,23 @@ ExternalProject_Add(external_tbb
        URL_HASH MD5=${TBB_HASH}
        PREFIX ${BUILD_DIR}/tbb
        PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
-               ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/${TBB_VS_VERSION}/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
+       ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
        INSTALL_DIR ${LIBDIR}/tbb
 )
+
+if (WIN32)
+       if(BUILD_MODE STREQUAL Release)
+               ExternalProject_Add_Step(external_tbb after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
+                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
+                       DEPENDEES install
+               )
+       endif()
+       if(BUILD_MODE STREQUAL Debug)
+               ExternalProject_Add_Step(external_tbb after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
+                       DEPENDEES install
+               )
+       endif()
+endif()
index 7559cb5100feeb26185f8ea22c20122c6c64f0c7..e0af29ce0a7093abf9018722f5fa92ed23581a04 100644 (file)
@@ -93,9 +93,9 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
 set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
 set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
 
-set(OPENSUBDIV_VERSION v3_1_1)
-set(OPENSUBDIV_Hash 25a9a6a94136b0eb85ce69e9c8cb6ab3)
-set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.zip)
+set(OPENSUBDIV_VERSION v3_3_3)
+set(OPENSUBDIV_Hash 29c79dc01ef616aab02670bed5544ddd)
+set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
 
 set(SDL_VERSION 2.0.4)
 set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
@@ -145,16 +145,9 @@ set(PYTHON_SHORT_VERSION_NO_DOTS 37)
 set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
 set(PYTHON_HASH eb8c2a6b1447d50813c02714af4681f3)
 
-if(UNIX AND NOT APPLE)
-       # Needed to be compatible with GCC 7, other platforms can upgrade later
-       set(TBB_VERSION 2017_U7)
-       set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
-       set(TBB_HASH 364f2a4b80e978f38a69cbf7c466b898)
-else()
-       set(TBB_VERSION 44_20160128)
-       set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz)
-       set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc)
-endif()
+set(TBB_VERSION 2018_U5)
+set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
+set(TBB_HASH ff3ae09f8c23892fbc3008c39f78288f)
 
 set(OPENVDB_VERSION 3.1.0)
 set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
index 9e9cf7ad55419284fbefd1907c1666a2518088bf..3fc78bf3c18955392ca380e90c79e929abbb7d67 100644 (file)
@@ -1,16 +1,13 @@
- opensubdiv/osd/d3d11VertexBuffer.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/opensubdiv/osd/d3d11VertexBuffer.cpp b/opensubdiv/osd/d3d11VertexBuffer.cpp
-index 603cbf4..07e7e0a 100644
---- a/opensubdiv/osd/d3d11VertexBuffer.cpp
-+++ b/opensubdiv/osd/d3d11VertexBuffer.cpp
-@@ -81,7 +81,7 @@ D3D11VertexBuffer::UpdateData(const float *src, int startVertex, int numVertices
+diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp
+index 3754b36e..7fe42bcc 100644
+--- a/opensubdiv/far/topologyRefiner.cpp
++++ b/opensubdiv/far/topologyRefiner.cpp
+@@ -263,7 +263,7 @@ namespace internal {
+         bool IsEmpty() const { return *((int_type*)this) == 0; }
  
-     deviceContext->Unmap(_uploadBuffer, 0);
+         FeatureMask() { Clear(); }
+-        FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); }
++        FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); }
  
--    D3D11_BOX srcBox = { 0, 0, 0, size, 1, 1 };
-+    D3D11_BOX srcBox = { 0, 0, 0, (UINT) size, 1, 1 };
-     deviceContext->CopySubresourceRegion(_buffer, 0, 0, 0, 0,
-                                          _uploadBuffer, 0, &srcBox);
- }
+         //  These are the two primary methods intended for use -- intialization via a set of Options
+         //  and reduction of the subsequent feature set (which presumes prior initialization with the
\ No newline at end of file