aboutsummaryrefslogtreecommitdiff
path: root/math/onednn/files/patch-CMakeLists.txt
blob: 79cc4d19a98c170841675669e0307609af0ce80d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- CMakeLists.txt.orig	2020-10-28 05:50:44 UTC
+++ CMakeLists.txt
@@ -115,7 +115,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/Threadpool.cmake")
 include("cmake/OpenCL.cmake")
@@ -160,8 +162,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})