[ https://issues.apache.org/jira/browse/ARROW-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16300645#comment-16300645 ]
ASF GitHub Bot commented on ARROW-1931: --------------------------------------- wesm closed pull request #1433: ARROW-1931: [C++] Suppress C4996 deprecation warning in MSVC builds for now URL: https://github.com/apache/arrow/pull/1433 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/appveyor.yml b/appveyor.yml index e647b8b77..ea7922bf6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,16 +20,13 @@ os: Visual Studio 2015 environment: matrix: - - JOB: "Cmake_Script_Tests" - GENERATOR: NMake Makefiles - PYTHON: "3.5" - ARCH: "64" - CONFIGURATION: "Release" - JOB: "Build" - GENERATOR: NMake Makefiles + GENERATOR: Visual Studio 15 2017 Win64 PYTHON: "3.5" ARCH: "64" CONFIGURATION: "Release" + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + BOOST_ROOT: C:\Libraries\boost_1_64_0 - JOB: "Build_Debug" GENERATOR: Visual Studio 14 2015 Win64 PYTHON: "3.5" @@ -49,13 +46,16 @@ environment: PYTHON: "3.5" ARCH: "64" CONFIGURATION: "Release" + - JOB: "Cmake_Script_Tests" + GENERATOR: NMake Makefiles + PYTHON: "3.5" + ARCH: "64" + CONFIGURATION: "Release" - JOB: "Build" - GENERATOR: Visual Studio 15 2017 Win64 + GENERATOR: NMake Makefiles PYTHON: "3.5" ARCH: "64" CONFIGURATION: "Release" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - BOOST_ROOT: C:\Libraries\boost_1_64_0 MSVC_DEFAULT_OPTIONS: ON BOOST_ROOT: C:\Libraries\boost_1_63_0 diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index 4e0ace0ba..97aed6b27 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -34,6 +34,14 @@ if (MSVC) # headers will see dllimport add_definitions(-DARROW_EXPORTING) + # ARROW-1931 See https://github.com/google/googletest/issues/1318 + # + # This is added to CMAKE_CXX_FLAGS instead of CXX_COMMON_FLAGS since only the + # former is passed into the external projects + if (MSVC_VERSION VERSION_GREATER 1900) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") + endif() + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # clang-cl set(CXX_COMMON_FLAGS "-EHsc") @@ -56,6 +64,9 @@ if (MSVC) string(REPLACE "/MD" "-MT" ${c_flag} "${${c_flag}}") endforeach() endif() + + # Support large object code + set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /bigobj") else() # Common flags set below with warning level set(CXX_COMMON_FLAGS "") ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [C++] w4996 warning due to std::tr1 failing builds on Visual Studio 2017 > ------------------------------------------------------------------------ > > Key: ARROW-1931 > URL: https://issues.apache.org/jira/browse/ARROW-1931 > Project: Apache Arrow > Issue Type: New Feature > Components: C++ > Affects Versions: 0.8.0 > Reporter: Wes McKinney > Labels: pull-request-available > Fix For: 0.9.0 > > > See for example. [~Max Risuhin] do you know what is the most appropriate fix > (besides silencing the deprecation warning)? > {code} > C:\projects\arrow\cpp\build\googletest_ep-prefix\src\googletest_ep\googletest\include\gtest/internal/gtest-port.h(996): > warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 > namespace and TR1-only machinery are deprecated and will be REMOVED. You can > define _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING to acknowledge that you > have received this warning. > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)