diff options
author | Louis Dionne <ldionne@apple.com> | 2019-04-11 17:23:18 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-04-11 17:23:18 +0000 |
commit | e7f2cbe45a354474c8f6841e3776c496e2d591f2 (patch) | |
tree | abc8ef8b693419e8324e027b942f2b045a025223 /pstl | |
parent | f32463848b6f3388facfaedddd5cc7139194e1ac (diff) | |
download | llvm-e7f2cbe45a354474c8f6841e3776c496e2d591f2.zip llvm-e7f2cbe45a354474c8f6841e3776c496e2d591f2.tar.gz llvm-e7f2cbe45a354474c8f6841e3776c496e2d591f2.tar.bz2 |
[pstl] Remove our custom FindTBB CMake file
Summary:
The TBBConfig file installed by TBB 2019 Update 5 works properly, so we
don't need this workaround anymore.
Reviewers: rodgert, MikeDvorskiy
Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60467
llvm-svn: 358196
Diffstat (limited to 'pstl')
-rw-r--r-- | pstl/CMakeLists.txt | 1 | ||||
-rw-r--r-- | pstl/cmake/FindTBB.cmake | 66 |
2 files changed, 0 insertions, 67 deletions
diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt index e72c85f..d8614a0 100644 --- a/pstl/CMakeLists.txt +++ b/pstl/CMakeLists.txt @@ -6,7 +6,6 @@ # #===----------------------------------------------------------------------===## cmake_minimum_required(VERSION 3.4.3) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h") file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$") diff --git a/pstl/cmake/FindTBB.cmake b/pstl/cmake/FindTBB.cmake deleted file mode 100644 index dad6458..0000000 --- a/pstl/cmake/FindTBB.cmake +++ /dev/null @@ -1,66 +0,0 @@ -#===-- FindTBB.cmake -----------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -include(FindPackageHandleStandardArgs) - -if (NOT TBB_FIND_COMPONENTS) - set(TBB_FIND_COMPONENTS tbb tbbmalloc) - foreach (_tbb_component ${TBB_FIND_COMPONENTS}) - set(TBB_FIND_REQUIRED_${_tbb_component} 1) - endforeach() -endif() - -find_path(_tbb_include_dir tbb/tbb.h) -if (_tbb_include_dir) - file(READ "${_tbb_include_dir}/tbb/tbb_stddef.h" _tbb_stddef LIMIT 2048) - string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}") - string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}") - string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}") - - set(TBB_VERSION "${_tbb_ver_major}.${_tbb_ver_minor}") - - unset(_tbb_stddef) - unset(_tbb_ver_major) - unset(_tbb_ver_minor) - - foreach (_tbb_component ${TBB_FIND_COMPONENTS}) - find_library(_tbb_release_lib ${_tbb_component}) - if (_tbb_release_lib) - set(TBB_${_tbb_component}_FOUND 1) - - add_library(TBB::${_tbb_component} SHARED IMPORTED) - list(APPEND TBB_IMPORTED_TARGETS TBB::${_tbb_component}) - - set(_tbb_lib_suffix) - if (UNIX AND NOT APPLE) - set(_tbb_lib_suffix ".2") - endif() - - set_target_properties(TBB::${_tbb_component} PROPERTIES - IMPORTED_CONFIGURATIONS "RELEASE" - IMPORTED_LOCATION_RELEASE "${_tbb_release_lib}${_tbb_lib_suffix}" - INTERFACE_INCLUDE_DIRECTORIES "${_tbb_include_dir}") - - find_library(_tbb_debug_lib ${_tbb_component}_debug) - if (_tbb_debug_lib) - set_target_properties(TBB::${_tbb_component} PROPERTIES - IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" - IMPORTED_LOCATION_DEBUG "${_tbb_debug_lib}${_tbb_lib_suffix}") - endif() - unset(_tbb_debug_lib CACHE) - unset(_tbb_lib_suffix) - endif() - unset(_tbb_release_lib CACHE) - endforeach() -endif() -unset(_tbb_include_dir CACHE) - -find_package_handle_standard_args(TBB - REQUIRED_VARS TBB_IMPORTED_TARGETS - HANDLE_COMPONENTS - VERSION_VAR TBB_VERSION) |