Skip to content

Commit

Permalink
Fix GTest_SOURCE=BUNDLED not work (#11215)
Browse files Browse the repository at this point in the history
Summary:
### Description

I failed to build velox in ubuntu and clang-15, because I have gtest-1.11.0 installed (to successully build we need v1.13.0).
When I try to set `-DGTest_SOURCE=BUNDLED` the cmake output shows that it does not work.

```
/data1/home/wujianchao/.cache/JetBrains/RemoteDev/dist/1729cdbf0ed8b_CLion-2024.2.2/bin/cmake/linux/x64/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/lib/llvm-15/bin/clang -DCMAKE_CXX_COMPILER=/usr/lib/llvm-15/bin/clang++ -DGTest_SOURCE=BUNDLED -DCMAKE_PREFIX_PATH=/data1/home/wujianchao/project/jd/velox/deps-install -G "Unix Makefiles" -S /data1/home/wujianchao/project/jd/velox -B /data1/home/wujianchao/project/jd/velox/cmake-build-debug

....

-- Could NOT find double-conversion (missing: double-conversion_DIR)
-- Found double-conversion: /usr/lib/x86_64-linux-gnu/libdouble-conversion.so (Required is at least version "3.1.5")
-- Found GTest: /usr/local/lib/cmake/GTest/GTestConfig.cmake (found version "1.11.0")
-- Using SYSTEM GTest

````

Pull Request resolved: #11215

Reviewed By: kagamiori

Differential Revision: D64418147

Pulled By: kgpai

fbshipit-source-id: 9c6fcc751730004eb4175e0f82b8ae335cb9d6ab
  • Loading branch information
JackyWoo authored and facebook-github-bot committed Oct 25, 2024
1 parent 2e837a8 commit 1d578fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
env:
CCACHE_DIR: "${{ github.workspace }}/.ccache"
VELOX_DEPENDENCY_SOURCE: SYSTEM
GTest_SOURCE: BUNDLED
simdjson_SOURCE: BUNDLED
xsimd_SOURCE: BUNDLED
CUDA_VERSION: "12.4"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ include_directories(SYSTEM velox/external)

# these were previously vendored in third-party/
if(NOT VELOX_DISABLE_GOOGLETEST)
set(GTest_SOURCE AUTO)
set_source(GTest)
resolve_dependency(GTest)
set(VELOX_GTEST_INCUDE_DIR
"${gtest_SOURCE_DIR}/googletest/include"
Expand Down

0 comments on commit 1d578fe

Please sign in to comment.