[ 
https://issues.apache.org/jira/browse/PARQUET-1313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496376#comment-16496376
 ] 

ASF GitHub Bot commented on PARQUET-1313:
-----------------------------------------

xhochy closed pull request #468: PARQUET-1313: [C++] Fix gtest build failure on 
Windows
URL: https://github.com/apache/parquet-cpp/pull/468
 
 
   

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/CMakeLists.txt b/CMakeLists.txt
index 0e100a37..52f63d09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,6 +164,9 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL 
"${CMAKE_CURRENT_SOURCE_DIR}")
     option(PARQUET_USE_STATIC_CRT
       "Build Parquet with statically linked CRT"
       OFF)
+    option(PARQUET_USE_CLCACHE
+      "Use clcache if available"
+      ON)
   endif()
 
   option(PARQUET_VERBOSE_THIRDPARTY_BUILD
@@ -172,6 +175,15 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL 
"${CMAKE_CURRENT_SOURCE_DIR}")
 
 endif()
 
+if (MSVC AND PARQUET_USE_CLCACHE AND
+     (("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles") OR
+      ("${CMAKE_GENERATOR}" STREQUAL "Ninja")))
+  find_program(CLCACHE_FOUND clcache)
+  if(CLCACHE_FOUND)
+    set(CMAKE_CXX_COMPILER ${CLCACHE_FOUND})
+  endif(CLCACHE_FOUND)
+endif()
+
 include(BuildUtils)
 
 if (PARQUET_BUILD_TESTS OR PARQUET_BUILD_EXECUTABLES OR 
PARQUET_BUILD_BENCHMARKS)
diff --git a/appveyor.yml b/appveyor.yml
index 7e393205..5cc83542 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -18,6 +18,9 @@
 # Operating system (build VM template)
 os: Visual Studio 2015
 
+matrix:
+  fast_finish: true
+
 environment:
   matrix:
     - GENERATOR: NMake Makefiles
@@ -28,10 +31,12 @@ environment:
       PYTHON: "3.5"
       ARCH: "64"
       CONFIGURATION: "Debug"
-    - GENERATOR: Visual Studio 14 2015 Win64
+    - 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
     - GENERATOR: Visual Studio 14 2015 Win64
       PYTHON: "3.5"
       ARCH: "64"
@@ -46,14 +51,18 @@ environment:
       PYTHON: "3.5"
       ARCH: "64"
       CONFIGURATION: "Toolchain"
+
   MSVC_DEFAULT_OPTIONS: ON
   BOOST_ROOT: C:\Libraries\boost_1_63_0
   BOOST_LIBRARYDIR: C:\Libraries\boost_1_63_0\lib64-msvc-14.0
+  USE_CLCACHE: false
 
 init:
   - set MINICONDA=C:\Miniconda35-x64
   - set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH%
-  - if "%GENERATOR%"=="NMake Makefiles" call "C:\Program Files (x86)\Microsoft 
Visual Studio 14.0\VC\vcvarsall.bat" x64
 
 build_script:
   - call ci\msvc-build.bat
+
+# Disable test discovery
+test: off
diff --git a/ci/msvc-build.bat b/ci/msvc-build.bat
index 6cca539f..0136819b 100644
--- a/ci/msvc-build.bat
+++ b/ci/msvc-build.bat
@@ -32,6 +32,17 @@ if NOT "%CONFIGURATION%" == "Debug" (
   set PARQUET_CXXFLAGS="%PARQUET_CXXFLAGS% /WX"
 )
 
+if "%GENERATOR%"=="NMake Makefiles" set need_vcvarsall=1
+
+if defined need_vcvarsall (
+    @rem Select desired compiler version
+    if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (
+        call "C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
+    ) else (
+        call "C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\vcvarsall.bat" amd64
+    )
+)
+
 if "%CONFIGURATION%" == "Toolchain" (
   conda install -y boost-cpp=1.63 thrift-cpp=0.11.0 ^
       brotli=0.6.0 zlib=1.2.11 snappy=1.1.6 lz4-c=1.7.5 zstd=1.2.0 ^
@@ -47,7 +58,6 @@ if "%CONFIGURATION%" == "Toolchain" (
       .. || exit /B
 
   cmake --build . --config Release || exit /B
-  ctest -VV || exit /B
 )
 
 if NOT "%CONFIGURATION%" == "Toolchain" (
@@ -59,8 +69,9 @@ if NOT "%CONFIGURATION%" == "Toolchain" (
         .. || exit /B
 
   cmake --build . --config %CONFIGURATION% || exit /B
+)
 
-  if "%CONFIGURATION%" == "Release" (
+if NOT "%CONFIGURATION%" == "Debug" (
+    @rem Tests are too slow and/or hang in debug mode
     ctest -VV || exit /B
-  )
 )
diff --git a/cmake_modules/ThirdpartyToolchain.cmake 
b/cmake_modules/ThirdpartyToolchain.cmake
index c23fea92..b2de4d2a 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -287,6 +287,10 @@ if(PARQUET_BUILD_TESTS AND NOT IGNORE_OPTIONAL_PACKAGES)
   if("$ENV{GTEST_HOME}" STREQUAL "")
     if(APPLE)
       set(GTEST_CMAKE_CXX_FLAGS "${EP_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1 
-Wno-unused-value -Wno-ignored-attributes")
+    elseif(MSVC)
+      # Workaround https://github.com/google/googletest/issues/1111 until
+      # a new gtest version is released
+      set(GTEST_CMAKE_CXX_FLAGS "${EP_CXX_FLAGS} 
-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
     else()
       set(GTEST_CMAKE_CXX_FLAGS "${EP_CXX_FLAGS}")
     endif()


 

----------------------------------------------------------------
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:
[email protected]


> [C++] Compilation failure with VS2017
> -------------------------------------
>
>                 Key: PARQUET-1313
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1313
>             Project: Parquet
>          Issue Type: Bug
>          Components: parquet-cpp
>            Reporter: Antoine Pitrou
>            Priority: Major
>
> I get hit by the following issue:
> https://github.com/google/googletest/issues/1111
> Not sure why I don't get the same problem with Arrow C++.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to