Explorar o código

HPCC-17228 Add TBB as a submodule

Signed-off-by: Mark Kelly <mark.kelly@lexisnexisrisk.com>
Mark Kelly %!s(int64=8) %!d(string=hai) anos
pai
achega
d7f8fb5fdf
Modificáronse 4 ficheiros con 47 adicións e 11 borrados
  1. 3 0
      .gitmodules
  2. 14 11
      cmake_modules/commonSetup.cmake
  3. 29 0
      system/tbb_sm/CMakeLists.txt
  4. 1 0
      system/tbb_sm/tbb

+ 3 - 0
.gitmodules

@@ -46,3 +46,6 @@
 [submodule "plugins/redis/hiredis"]
 	path = plugins/redis/hiredis
 	url = https://github.com/hpcc-systems/hiredis.git
+[submodule "system/tbb_sm/tbb"]
+    path = system/tbb_sm/tbb
+    url = https://github.com/01org/tbb.git

+ 14 - 11
cmake_modules/commonSetup.cmake

@@ -877,24 +877,27 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
       endif()
 
       if(USE_TBB)
-        find_package(TBB)
-        if (TBB_FOUND)
+#       find_package(TBB)
+#       if (TBB_FOUND)
           add_definitions (-D_USE_TBB)
-        else()
-          message(FATAL_ERROR "TBB requested but package not found")
-        endif()
+          add_library(libtbb SHARED IMPORTED)
+#       else()
+#         message(FATAL_ERROR "TBB requested but package not found")
+#       endif()
       else()
         set(TBB_INCLUDE_DIR "")
       endif(USE_TBB)
 
       if(USE_TBBMALLOC)
-        find_package(TBBMALLOC)
-        if (TBBMALLOC_FOUND)
+#       find_package(TBBMALLOC)
+#       if (TBBMALLOC_FOUND)
           add_definitions (-D_USE_TBBMALLOC)
-        else()
-            message(WARNING "Optional TBBMALLOC requested, but missing")
-            set(USE_TBBMALLOC OFF)
-        endif()
+          add_library(libtbbmalloc SHARED IMPORTED)
+          add_library(libtbbmalloc_proxy SHARED IMPORTED)
+#       else()
+#           message(WARNING "Optional TBBMALLOC requested, but missing")
+#           set(USE_TBBMALLOC OFF)
+#       endif()
       endif(USE_TBBMALLOC)
 
   ENDIF()

+ 29 - 0
system/tbb_sm/CMakeLists.txt

@@ -0,0 +1,29 @@
+################################################################################
+#    HPCC SYSTEMS software Copyright (C) 2015 HPCC Systems.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+################################################################################
+
+# Component: tbb
+
+#####################################################
+# Description:
+# ------------
+#    Cmake Input File for tbb, tbbmallo, tbbproxy
+#####################################################
+
+project( tbb )
+
+if (USE_TBB)
+    add_library(libtbb SHARED IMPORTED)
+endif()

+ 1 - 0
system/tbb_sm/tbb

@@ -0,0 +1 @@
+Subproject commit 1d5d04ce101eaaadf8b57955366d7758c09e7950