Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't invoke vcpkg from this repo with CMAKE_TOOLCHAIN_FILE set #2527

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,16 @@ if(BUILD_TESTING)
# Make sure we are always bootsrapped with vcpkg on Windows
find_package(GTest)
if(NOT (GTEST_FOUND OR GTest_FOUND))
install_windows_deps()
include(${CMAKE_TOOLCHAIN_FILE})
find_package(GTest REQUIRED)
if(DEFINED CMAKE_TOOLCHAIN_FILE)
message(
FATAL_ERROR
"Pleaes install GTest with the CMAKE_TOOLCHAIN_FILE at ${CMAKE_TOOLCHAIN_FILE}"
)
else()
install_windows_deps()
include(${CMAKE_TOOLCHAIN_FILE})
find_package(GTest REQUIRED)
endif()
endif()
else()
# Prefer GTest installed by OS distro, brew or vcpkg package manager
Expand Down