This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 37381b21 ci: use bundled googletest on Windows (#642)
37381b21 is described below
commit 37381b211203f17487e7ce38b6144cfc8241b239
Author: David Li <[email protected]>
AuthorDate: Wed May 3 13:29:31 2023 -0400
ci: use bundled googletest on Windows (#642)
Fixes #616.
---
.github/workflows/native-windows.yml | 4 ++++
c/cmake_modules/AdbcDefines.cmake | 1 +
ci/conda_env_cpp.txt | 1 -
ci/scripts/cpp_build.ps1 | 3 ++-
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/native-windows.yml
b/.github/workflows/native-windows.yml
index a658cd56..31258a5e 100644
--- a/.github/workflows/native-windows.yml
+++ b/.github/workflows/native-windows.yml
@@ -86,6 +86,8 @@ jobs:
run: |
mamba install -c conda-forge \
--file ci/conda_env_cpp.txt
+ # Force bundled gtest
+ mamba uninstall gtest
- name: Build and Install (No ASan)
shell: pwsh
@@ -138,6 +140,8 @@ jobs:
run: |
mamba install -c conda-forge \
--file ci/conda_env_cpp.txt
+ # Force bundled gtest
+ mamba uninstall gtest
- name: Build Driver Manager
shell: pwsh
diff --git a/c/cmake_modules/AdbcDefines.cmake
b/c/cmake_modules/AdbcDefines.cmake
index 6ff186d6..c82dd9ef 100644
--- a/c/cmake_modules/AdbcDefines.cmake
+++ b/c/cmake_modules/AdbcDefines.cmake
@@ -21,6 +21,7 @@
enable_language(C CXX)
set(BUILD_SUPPORT_DIR "${REPOSITORY_ROOT}/ci/build_support")
+set(CMAKE_CXX_STANDARD 17)
include(AdbcVersion)
include(CheckLinkerFlag)
diff --git a/ci/conda_env_cpp.txt b/ci/conda_env_cpp.txt
index fe42d44d..2587a3ce 100644
--- a/ci/conda_env_cpp.txt
+++ b/ci/conda_env_cpp.txt
@@ -17,7 +17,6 @@
cmake
compilers
-gmock>=1.10.0
gtest>=1.10.0
libpq
ninja
diff --git a/ci/scripts/cpp_build.ps1 b/ci/scripts/cpp_build.ps1
index 37194d07..0ddd1e41 100755
--- a/ci/scripts/cpp_build.ps1
+++ b/ci/scripts/cpp_build.ps1
@@ -31,6 +31,7 @@ function Build-Subproject {
New-Item -ItemType Directory -Force -Path $BuildDir | Out-Null
Push-Location $BuildDir
+ # XXX(apache/arrow-adbc#616): must use Release build to line up with gtest
cmake `
$(Join-Path $SourceDir "c\") `
-DADBC_BUILD_SHARED=ON `
@@ -39,7 +40,7 @@ function Build-Subproject {
-DADBC_DRIVER_MANAGER="$($BuildDriverManager)" `
-DADBC_DRIVER_POSTGRESQL="$($BuildDriverPostgreSQL)" `
-DADBC_DRIVER_SQLITE="$($BuildDriverSqlite)" `
- -DCMAKE_BUILD_TYPE=Debug `
+ -DCMAKE_BUILD_TYPE=Release `
-DCMAKE_INSTALL_PREFIX="$($InstallDir)" `
-DCMAKE_VERBOSE_MAKEFILE=ON
if (-not $?) { exit 1 }