aboutsummaryrefslogtreecommitdiff
path: root/ports/arrow/fix-msvc-1900.patch
blob: 7c29070b738582dca480d06e1456bf2cb6919639 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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_;