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 leaf_to_base_; +#else std::unordered_map leaf_to_base_; +#endif // Mapping between ColumnPath DotString to the leaf index std::unordered_multimap leaf_to_idx_;