aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-09-26 17:49:59 +0800
committerGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-09-26 02:49:59 -0700
commitc7b705fc057ccf6571110378b05d0230d6e6f2a6 (patch)
tree71778ab2dbe7aeb20d243bd7357734f01fa96864
parent273c31fe37e2d573fb8e87f6f2d494236b3cf6a9 (diff)
downloadvcpkg-c7b705fc057ccf6571110378b05d0230d6e6f2a6.tar.gz
vcpkg-c7b705fc057ccf6571110378b05d0230d6e6f2a6.zip
[arrow]Fix build error on Visual Studio 2019. (#8263)
-rw-r--r--ports/arrow/CONTROL2
-rw-r--r--ports/arrow/fix-msvc-1900.patch31
-rw-r--r--ports/arrow/portfile.cmake1
3 files changed, 33 insertions, 1 deletions
diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL
index ea787e24a..9650c7823 100644
--- a/ports/arrow/CONTROL
+++ b/ports/arrow/CONTROL
@@ -1,5 +1,5 @@
Source: arrow
-Version: 0.14.1
+Version: 0.14.1-1
Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser
Homepage: https://github.com/apache/arrow
Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations.
diff --git a/ports/arrow/fix-msvc-1900.patch b/ports/arrow/fix-msvc-1900.patch
new file mode 100644
index 000000000..7c29070b7
--- /dev/null
+++ b/ports/arrow/fix-msvc-1900.patch
@@ -0,0 +1,31 @@
+diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake
+index 496904b..887f9c4 100644
+--- a/cpp/cmake_modules/SetupCxxFlags.cmake
++++ b/cpp/cmake_modules/SetupCxxFlags.cmake
+@@ -124,7 +124,9 @@ macro(arrow_add_werror_if_debug)
+ if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
+ # Treat all compiler warnings as errors
+ if("${COMPILER_FAMILY}" STREQUAL "msvc")
+- set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /WX")
++ if (MSVC_VERSION VERSION_LESS 1900)
++ set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /WX")
++ endif()
+ else()
+ set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Werror")
+ endif()
+diff --git a/cpp/src/parquet/schema.h b/cpp/src/parquet/schema.h
+index 740edbc..1526c73 100644
+--- a/cpp/src/parquet/schema.h
++++ b/cpp/src/parquet/schema.h
+@@ -457,7 +457,11 @@ class PARQUET_EXPORT SchemaDescriptor {
+ // -- -- b |
+ // -- -- -- c |
+ // -- -- -- -- d
++#if _MSC_VER >= 1900
++ std::unordered_map<int, schema::NodePtr> leaf_to_base_;
++#else
+ std::unordered_map<int, const schema::NodePtr> leaf_to_base_;
++#endif
+
+ // Mapping between ColumnPath DotString to the leaf index
+ std::unordered_multimap<std::string, int> leaf_to_idx_;
diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake
index 58b6f489c..3b8fc16d6 100644
--- a/ports/arrow/portfile.cmake
+++ b/ports/arrow/portfile.cmake
@@ -12,6 +12,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
all.patch
+ fix-msvc-1900.patch
)
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED)