[parallelstl] Update to latest version and fix find_package unable to find ParallelSTLConfig.cmake (#9443)

* [parallelstl] Fix find_package unable to find ParallelSTLConfig.cmake

* Add stdlib headers
This commit is contained in:
NancyLi1013 2020-01-06 11:19:13 -08:00 committed by dan-shaw
parent 773e835687
commit 020923a98d
4 changed files with 42 additions and 21 deletions

View File

@ -1,5 +1,5 @@
Source: parallelstl
Version: 20190522-1
Version: 20191218
Homepage: https://github.com/intel/parallelstl
Description: Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies, as specified in ISO/IEC 14882:2017 standard, commonly called C++17.
Build-Depends: tbb

View File

@ -0,0 +1,32 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 878b212..caa3cba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,7 +44,7 @@ add_library(pstl::ParallelSTL ALIAS ParallelSTL)
if (PARALLELSTL_USE_PARALLEL_POLICIES)
message(STATUS "Using Parallel Policies")
if (PARALLELSTL_BACKEND STREQUAL "tbb")
- find_package(TBB 2018 REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc)
+ find_package(TBB CONFIG REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc)
message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})")
target_link_libraries(ParallelSTL INTERFACE TBB::tbb)
else()
@@ -64,8 +64,7 @@ target_include_directories(ParallelSTL
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/stdlib>
- $<INSTALL_INTERFACE:include>
- $<INSTALL_INTERFACE:stdlib>)
+ $<INSTALL_INTERFACE:include>)
target_compile_features(ParallelSTL
INTERFACE
@@ -100,6 +99,8 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake"
DESTINATION lib/cmake/ParallelSTL)
install(DIRECTORY include/pstl
DESTINATION include)
+file(GLOB STDLIB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/stdlib/pstl/*)
+install(FILES ${STDLIB_HEADERS} DESTINATION include/pstl)
add_custom_target(install-pstl
COMMAND "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_install.cmake" -DCOMPONENT=ParallelSTL)

View File

@ -1,12 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c20a5c3..1ba8583 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,3 +74,6 @@ configure_file(
export(TARGETS ParallelSTL NAMESPACE pstl:: FILE ParallelSTLTargets.cmake)
export(PACKAGE ParallelSTL)
+
+#Install headers
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include DESTINATION include)
\ No newline at end of file

View File

@ -1,12 +1,11 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO intel/parallelstl
REF 20190522
SHA512 ad1b820ff4c2ce45ea3d6069dc8d5219449baca44d0bce86482aca247db7a4191e2bce10ab8365056ca278322809fdbb096519436e850cf95f2bb98fa7bc1ab1
REPO intel/parallelstl #20191218
REF 37761e15f62c03b7eb179db64ef930a69f33dfac
SHA512 dc8c875f692043b6f10ce7faf034e07536978537ea2a3d545be499cfa047f0c362c5109eb744a41dc0c92bd0fc56d98505183444bd376aeb257c9204480e6668
HEAD_REF master
PATCHES fix-install-header.patch
PATCHES
fix-cmakelist.patch
)
vcpkg_configure_cmake(
@ -18,10 +17,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ParallelSTL)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)