Dima Panov wrote on 2022/10/18 01:48: > Blender have an options knob OPENMP to utilize it.
Uh, I think that is off by default, but switching it to on will most likely eliminate OpenMP linker error. > By the way, I'll modify opensubdiv to make openmp support optional It would be nice to be able to turn it off by option, but we also need to fix the broke when it is turned on. Attached is a patch that you will probably need. This will build the library, but it is not yet tested to see if a successful library is created. # Can attachments be passed through to ports@FreeBSD? :) Regards.
diff --git a/graphics/opensubdiv/files/patch-documentation_CMakeLists.txt b/graphics/opensubdiv/files/patch-documentation_CMakeLists.txt index 422c75bcc3..f0e681978f 100644 --- a/graphics/opensubdiv/files/patch-documentation_CMakeLists.txt +++ b/graphics/opensubdiv/files/patch-documentation_CMakeLists.txt @@ -1,6 +1,6 @@ ---- work/OpenSubdiv-3_2_0/documentation/CMakeLists.txt.orig 2017-07-07 01:16:15 UTC +--- documentation/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC +++ documentation/CMakeLists.txt -@@ -254,7 +254,7 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUN +@@ -269,7 +269,7 @@ if (DOCUTILS_FOUND AND Python_Interpreter_FOUND) -E copy "${infile}" "${outfile}" ) diff --git a/graphics/opensubdiv/files/patch-opensubdiv_CMakeLists.txt b/graphics/opensubdiv/files/patch-opensubdiv_CMakeLists.txt new file mode 100644 index 0000000000..b47916caa6 --- /dev/null +++ b/graphics/opensubdiv/files/patch-opensubdiv_CMakeLists.txt @@ -0,0 +1,11 @@ +--- opensubdiv/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC ++++ opensubdiv/CMakeLists.txt +@@ -45,6 +45,8 @@ if (NOT NO_LIB) + if( OPENMP_FOUND ) + if (CMAKE_COMPILER_IS_GNUCXX) + list(APPEND PLATFORM_CPU_LIBRARIES gomp) ++ else() ++ list(APPEND PLATFORM_CPU_LIBRARIES OpenMP::OpenMP_CXX) + endif() + endif() + diff --git a/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt b/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt new file mode 100644 index 0000000000..8b02e0d7f6 --- /dev/null +++ b/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt @@ -0,0 +1,22 @@ +--- opensubdiv/osd/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC ++++ opensubdiv/osd/CMakeLists.txt +@@ -76,6 +76,8 @@ if(OPENMP_FOUND ) + + if (CMAKE_COMPILER_IS_GNUCXX) + list(APPEND PLATFORM_CPU_LIBRARIES gomp) ++ else() ++ list(APPEND PLATFORM_CPU_LIBRARIES OpenMP::OpenMP_CXX) + endif() + endif() + +@@ -96,10 +98,6 @@ if( TBB_FOUND ) + ) + + list(APPEND PUBLIC_HEADER_FILES ${TBB_PUBLIC_HEADERS}) +- +- if (CMAKE_COMPILER_IS_GNUCXX) +- list(APPEND PLATFORM_CPU_LIBRARIES gomp) +- endif() + + list(APPEND PLATFORM_CPU_LIBRARIES + ${TBB_LIBRARIES} diff --git a/graphics/opensubdiv/files/patch-regression_CMakeLists.txt b/graphics/opensubdiv/files/patch-regression_CMakeLists.txt index 903aa96196..f43ec0abe3 100644 --- a/graphics/opensubdiv/files/patch-regression_CMakeLists.txt +++ b/graphics/opensubdiv/files/patch-regression_CMakeLists.txt @@ -1,8 +1,8 @@ ---- regression/CMakeLists.txt.orig 2020-06-30 16:02:18 UTC +--- regression/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC +++ regression/CMakeLists.txt -@@ -26,14 +26,16 @@ add_subdirectory(common) +@@ -28,14 +28,16 @@ if (NOT NO_REGRESSION) - if (NOT NO_REGRESSION) + add_subdirectory(bfr_evaluate) - add_subdirectory(hbr_regression) +# uses deprecated api