CMakeLists.txt: fix googletest related options #1152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://cmake.org/cmake/help/book/mastering-cmake/chapter/Writing%20CMakeLists%20Files.html says that CMake options are case-sensitive and I don't see lower-case version in currently used googletest submodules and gtest is indeed installed with leveldb
install_gmock option I don't see at all, so I've kept it as is, INSTALL_GTEST, BUILD_GMOCK do exist as upper-case
$ grep -Ri install_.*mock .
./CMakeLists.txt: set(install_gmock OFF)
./third_party/googletest/googlemock/CMakeLists.txt:install_project(gmock gmock_main) $ grep -Ri build_gmock .
./CMakeLists.txt: set(BUILD_GMOCK ON)
./third_party/googletest/googletest/README.md:cmake .. -DBUILD_GMOCK=OFF ./third_party/googletest/CMakeLists.txt:option(BUILD_GMOCK "Builds the googlemock subproject" ON) ./third_party/googletest/CMakeLists.txt:if(BUILD_GMOCK) $ grep -Ri install_gtest .
./CMakeLists.txt: set(INSTALL_GTEST OFF)
./third_party/googletest/googletest/cmake/internal_utils.cmake: if(INSTALL_GTEST) ./third_party/googletest/googletest/CMakeLists.txt:if (INSTALL_GTEST) ./third_party/googletest/CMakeLists.txt:option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)