ruki hace 4 años
padre
commit
7409bd8dc2
Se han modificado 1 ficheros con 1 adiciones y 9 borrados
  1. 1 9
      packages/t/tbb/fetch.lua

+ 1 - 9
packages/t/tbb/fetch.lua

@@ -1,4 +1,3 @@
-import("core.base.semver")
 import("lib.detect.find_path")
 import("lib.detect.find_path")
 import("lib.detect.find_library")
 import("lib.detect.find_library")
 
 
@@ -9,7 +8,7 @@ function _find_package_on_windows(package, opt)
         "$(env ONEAPI_ROOT)\\tbb\\latest"
         "$(env ONEAPI_ROOT)\\tbb\\latest"
     }
     }
 
 
-    -- find library
+    -- find includes and links
     local result = {links = {}, linkdirs = {}, includedirs = {}}
     local result = {links = {}, linkdirs = {}, includedirs = {}}
     for _, lib in ipairs({"tbb", "tbbmalloc", "tbbmalloc_proxy"}) do
     for _, lib in ipairs({"tbb", "tbbmalloc", "tbbmalloc_proxy"}) do
         local linkinfo = find_library(lib, paths, {suffixes = path.join("lib", rdir, "vc14")})
         local linkinfo = find_library(lib, paths, {suffixes = path.join("lib", rdir, "vc14")})
@@ -19,13 +18,9 @@ function _find_package_on_windows(package, opt)
         end
         end
     end
     end
     result.linkdirs = table.unique(result.linkdirs)
     result.linkdirs = table.unique(result.linkdirs)
-
-    -- find include
     table.insert(result.includedirs, find_path(path.join("tbb", "tbb.h"), paths, {suffixes = "include"}))
     table.insert(result.includedirs, find_path(path.join("tbb", "tbb.h"), paths, {suffixes = "include"}))
 
 
     if #result.includedirs > 0 and #result.linkdirs > 0 then
     if #result.includedirs > 0 and #result.linkdirs > 0 then
-
-        -- find version
         local root = result.includedirs[1]
         local root = result.includedirs[1]
         local version_file = path.join(root, "oneapi", "tbb", "version.h")
         local version_file = path.join(root, "oneapi", "tbb", "version.h")
         if not os.isfile(version_file) then
         if not os.isfile(version_file) then
@@ -52,9 +47,6 @@ function main(package, opt)
         local result
         local result
         if package:is_plat("windows") then
         if package:is_plat("windows") then
             result = _find_package_on_windows(package, opt)
             result = _find_package_on_windows(package, opt)
-            if opt.require_version and result and result.version and not semver.satisfies(result.version, opt.require_version) then
-                result = nil
-            end
         else
         else
             result = package:find_package("tbb", opt)
             result = package:find_package("tbb", opt)
         end
         end