mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:03:02 +08:00
[libcds] Initial commit of 2.3.2
This commit is contained in:
parent
ee3f0af231
commit
0c468df7c7
4
ports/libcds/CONTROL
Normal file
4
ports/libcds/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: libcds
|
||||
Version: 2.3.2
|
||||
Build-Depends: boost-system, boost-thread
|
||||
Description: a collection of concurrent containers that don't require external (manual) synchronization for shared access, and safe memory reclamation (SMR) algorithms like Hazard Pointer and user-space RCU that is used as an epoch-based SMR.
|
31
ports/libcds/cmake-install.patch
Normal file
31
ports/libcds/cmake-install.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a198e26..e891aee 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,6 +41,10 @@ if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DARWIN_C_SOURCE")
|
||||
endif()
|
||||
|
||||
+if(MSVC)
|
||||
+ add_definitions(-DCDS_BUILD_LIB)
|
||||
+endif()
|
||||
+
|
||||
if(WITH_BOOST_ATOMIC)
|
||||
if(Boost_FOUND)
|
||||
if(${Boost_MINOR_VERSION} GREATER 53)
|
||||
@@ -191,9 +195,13 @@ target_compile_options(${CDS_STATIC_LIBRARY} PUBLIC "${LIBCDS_PUBLIC_CXX_FLAGS}"
|
||||
target_compile_options(${CDS_SHARED_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}")
|
||||
target_compile_options(${CDS_STATIC_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}")
|
||||
|
||||
-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP)
|
||||
-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY)
|
||||
+if(NOT DISABLE_INSTALL_SHARED)
|
||||
+install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP)
|
||||
+install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY)
|
||||
+endif()
|
||||
+if(NOT DISABLE_INSTALL_STATIC)
|
||||
install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT})
|
||||
+endif()
|
||||
install(EXPORT LibCDSConfig FILE LibCDSConfig.cmake NAMESPACE LibCDS:: DESTINATION lib/cmake/LibCDS)
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/cds DESTINATION include COMPONENT ${HEADERS_COMPONENT})
|
||||
|
39
ports/libcds/portfile.cmake
Normal file
39
ports/libcds/portfile.cmake
Normal file
@ -0,0 +1,39 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO khizmax/libcds
|
||||
REF v2.3.2
|
||||
SHA512 f8313f85ae2950a008245603296b63bdbb2f58ead1a453fb287a8ecb96b79edc5b2f8fe33d6027dbc7ead6ccd1bb7ca8dd830091a86760358bb812a39b4ba83f
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" DISABLE_INSTALL_SHARED)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DENABLE_UNIT_TEST=OFF
|
||||
-DENABLE_STRESS_TEST=OFF
|
||||
-DDISABLE_INSTALL_STATIC=${DISABLE_INSTALL_STATIC}
|
||||
-DDISABLE_INSTALL_SHARED=${DISABLE_INSTALL_SHARED}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/LibCDS)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/LICENSE
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcds RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
Loading…
Reference in New Issue
Block a user