aboutsummaryrefslogtreecommitdiff
path: root/math/onednn/files
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2020-04-04 07:13:35 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2020-04-04 07:13:35 +0000
commit107ad6127b980a1d3ff1d84102af874b342d898a (patch)
tree12969688baffe373555a318dd0ef76673732f41c /math/onednn/files
parent437f2150d6d94ed831245b42aa81fae1fa0fbe3e (diff)
downloadports-107ad6127b980a1d3ff1d84102af874b342d898a.tar.gz
ports-107ad6127b980a1d3ff1d84102af874b342d898a.zip
Notes
Diffstat (limited to 'math/onednn/files')
-rw-r--r--math/onednn/files/patch-CMakeLists.txt28
-rw-r--r--math/onednn/files/patch-cmake_platform.cmake19
2 files changed, 47 insertions, 0 deletions
diff --git a/math/onednn/files/patch-CMakeLists.txt b/math/onednn/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..1c0e6c8163ed
--- /dev/null
+++ b/math/onednn/files/patch-CMakeLists.txt
@@ -0,0 +1,28 @@
+--- CMakeLists.txt.orig 2020-03-31 16:33:27 UTC
++++ CMakeLists.txt
+@@ -92,7 +92,9 @@ include("cmake/mkldnn_compat.cmake")
+
+ include("cmake/utils.cmake")
+ include("cmake/options.cmake")
+-include("cmake/OpenMP.cmake")
++if (USE_OPENMP)
++ include("cmake/OpenMP.cmake")
++endif()
+ include("cmake/TBB.cmake")
+ include("cmake/OpenCL.cmake")
+ include("cmake/platform.cmake")
+@@ -133,8 +135,12 @@ include(GNUInstallDirs)
+ include(CMakePackageConfigHelpers)
+
+ add_subdirectory(src)
+-add_subdirectory(examples)
+-add_subdirectory(tests)
++if(BUILD_EXAMPLES)
++ add_subdirectory(examples)
++endif()
++if(BUILD_TESTS)
++ add_subdirectory(tests)
++endif()
+
+ if(DNNL_INSTALL_MODE STREQUAL "BUNDLE")
+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX})
diff --git a/math/onednn/files/patch-cmake_platform.cmake b/math/onednn/files/patch-cmake_platform.cmake
new file mode 100644
index 000000000000..23affea8113d
--- /dev/null
+++ b/math/onednn/files/patch-cmake_platform.cmake
@@ -0,0 +1,19 @@
+--- cmake/platform.cmake.orig 2020-03-31 16:33:27 UTC
++++ cmake/platform.cmake
+@@ -95,7 +95,6 @@ elseif(UNIX OR MINGW)
+ append(CMAKE_CCXX_NOEXCEPT_FLAGS "-fno-exceptions")
+ # compiler specific settings
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(DEF_ARCH_OPT_FLAGS "-msse4.1")
+ # Clang cannot vectorize some loops with #pragma omp simd and gets
+ # very upset. Tell it that it's okay and that we love it
+ # unconditionally.
+@@ -144,7 +143,7 @@ elseif(UNIX OR MINGW)
+ set(DNNL_ENABLE_JIT_PROFILING CACHE BOOL "OFF" FORCE)
+ message(WARNING "AArch64 build, DNNL_ENABLE_JIT_PROFILING is OFF")
+ else()
+- set(DEF_ARCH_OPT_FLAGS "-msse4.1")
++ #set(DEF_ARCH_OPT_FLAGS "-msse4.1")
+ endif()
+ # suppress warning on assumptions made regarding overflow (#146)
+ append(CMAKE_CCXX_NOWARN_FLAGS "-Wno-strict-overflow")