Skip to content

Commit

Permalink
[folly] Workaround bug for VS 15.6
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkaratarakis committed Feb 10, 2018
1 parent a120c81 commit 641128c
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 37 deletions.
2 changes: 1 addition & 1 deletion ports/folly/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: folly
Version: 2017.11.27.00-2
Version: 2017.11.27.00-3
Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows
Build-Depends: zlib, openssl, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, boost-context, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-conversion, boost-multi-index, boost-crc
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec5a985c..36564534 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,13 +136,6 @@ source_group("folly\\build" FILES
)

set(FOLLY_SHINY_DEPENDENCIES
- Boost::chrono
- Boost::context
- Boost::date_time
- Boost::filesystem
- Boost::program_options
- Boost::regex
- Boost::system
OpenSSL::SSL
OpenSSL::Crypto
)
@@ -179,6 +172,7 @@ endif()

set(FOLLY_LINK_LIBRARIES
${FOLLY_LINK_LIBRARIES}
+ ${Boost_LIBRARIES}
Iphlpapi.lib
Ws2_32.lib

@@ -320,7 +314,7 @@ if (BUILD_TESTS)
)
target_link_libraries(folly_test_support
PUBLIC
- Boost::thread
+ ${Boost_LIBRARIES}
folly
${LIBGMOCK_LIBRARY}
)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec5a985c..36564534 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,13 +136,6 @@ source_group("folly\\build" FILES
)

set(FOLLY_SHINY_DEPENDENCIES
- Boost::chrono
- Boost::context
- Boost::date_time
- Boost::filesystem
- Boost::program_options
- Boost::regex
- Boost::system
OpenSSL::SSL
OpenSSL::Crypto
)
@@ -179,6 +172,7 @@ endif()

set(FOLLY_LINK_LIBRARIES
${FOLLY_LINK_LIBRARIES}
+ ${Boost_LIBRARIES}
Iphlpapi.lib
Ws2_32.lib

@@ -320,7 +314,7 @@ if (BUILD_TESTS)
)
target_link_libraries(folly_test_support
PUBLIC
- Boost::thread
+ ${Boost_LIBRARIES}
folly
${LIBGMOCK_LIBRARY}
)
25 changes: 25 additions & 0 deletions ports/folly/msvc-15.6-workaround.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/folly/FBString.h b/folly/FBString.h
index 4882aac..6c83046 100644
--- a/folly/FBString.h
+++ b/folly/FBString.h
@@ -1890,12 +1890,14 @@ inline basic_fbstring<E, T, A, S>& basic_fbstring<E, T, A, S>::operator=(

template <typename E, class T, class A, class S>
template <typename TP>
-inline typename std::enable_if<
- std::is_same<
- typename std::decay<TP>::type,
- typename basic_fbstring<E, T, A, S>::value_type>::value,
- basic_fbstring<E, T, A, S>&>::type
-basic_fbstring<E, T, A, S>::operator=(TP c) {
+inline auto
+basic_fbstring<E, T, A, S>::operator=(TP c)
+ -> typename std::enable_if<
+ std::is_same<
+ typename std::decay<TP>::type,
+ typename basic_fbstring<E, T, A, S>::value_type>::value,
+ basic_fbstring<E, T, A, S>&>::type
+{
Invariant checker(*this);

if (empty()) {
3 changes: 2 additions & 1 deletion ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ vcpkg_from_github(
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.cmake
${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.patch
${CMAKE_CURRENT_LIST_DIR}/msvc-15.6-workaround.patch
)

if(VCPKG_CRT_LINKAGE STREQUAL static)
Expand Down

0 comments on commit 641128c

Please sign in to comment.