mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
* * [libcds] Update to v2.3.3 (#5274) * Minimum CMake version is 3.0.2 * Changed software license from BSD to Boost * Removed '#pragma lib' for Windows build * Bugfix and minor improvements * [libcds] Use PATCHES parameter instead of `vcpkg_apply_patches()` * [libcds] Fix static builds
This commit is contained in:
parent
68a540d84c
commit
61c6ef26f7
@ -1,31 +1,32 @@
|
||||
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})
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d97ee07..f8affbb 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -34,6 +34,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(TARGET boost::atomic)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDS_USE_BOOST_ATOMIC")
|
||||
@@ -186,9 +190,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 RUNTIME DESTINATION lib${LIB_SUFFIX})
|
||||
-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY)
|
||||
-install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT})
|
||||
+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})
|
||||
|
@ -1,13 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e891aee..9f12295 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -125,7 +125,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
||||
if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
|
||||
list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16")
|
||||
- set(LIB_SUFFIX "64")
|
||||
+ set(LIB_SUFFIX "64" CACHE STRING "")
|
||||
|
||||
# GCC-7: 128-bit atomics support is implemented via libatomic on amd64
|
||||
# see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index aa287ff8..20fe7b49 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -118,7 +118,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_C
|
||||
|
||||
if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
|
||||
list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16")
|
||||
- set(LIB_SUFFIX "64")
|
||||
+ set(LIB_SUFFIX "64" CACHE STRING "")
|
||||
|
||||
# GCC-7: 128-bit atomics support is implemented via libatomic on amd64
|
||||
# see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html
|
@ -1,4 +1,4 @@
|
||||
Source: libcds
|
||||
Version: 2.3.2
|
||||
Version: 2.3.3
|
||||
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.
|
||||
|
@ -3,16 +3,12 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO khizmax/libcds
|
||||
REF v2.3.2
|
||||
SHA512 f8313f85ae2950a008245603296b63bdbb2f58ead1a453fb287a8ecb96b79edc5b2f8fe33d6027dbc7ead6ccd1bb7ca8dd830091a86760358bb812a39b4ba83f
|
||||
REF v2.3.3
|
||||
SHA512 95e67da4336d622d47bdf124d76827ca3e82e65ab5f725ccf58c2d7957960e7d17ee1ebb2126eed70f7a3ca1c97f840d9f59c1ae2eb80215d10abf70b215e510
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/lib-suffix-option.patch
|
||||
001-cmake-install.patch
|
||||
002-lib-suffix-option.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user