This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new b3506ad Fix CMake configuration error in snappy (#803)
b3506ad is described below
commit b3506ad86f8dbd9f28eee7bc4186596b91aa5803
Author: Twice <[email protected]>
AuthorDate: Thu Sep 1 18:36:51 2022 +0800
Fix CMake configuration error in snappy (#803)
---
cmake/{snappy.cmake => modules/FindGTest.cmake} | 15 ++-------------
cmake/{snappy.cmake => modules/FindGflags.cmake} | 15 ++-------------
cmake/snappy.cmake | 1 +
3 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/cmake/snappy.cmake b/cmake/modules/FindGTest.cmake
similarity index 74%
copy from cmake/snappy.cmake
copy to cmake/modules/FindGTest.cmake
index 72e587a..fd0dcb7 100644
--- a/cmake/snappy.cmake
+++ b/cmake/modules/FindGTest.cmake
@@ -15,17 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-include_guard()
+# used for `find_package(GTest)` mechanism in snappy
-include(cmake/utils.cmake)
-
-FetchContent_DeclareGitHubWithMirror(snappy
- google/snappy 1.1.7
- MD5=40a371a653b7bb5a47df59b937b78557
-)
-
-FetchContent_MakeAvailableWithArgs(snappy
- SNAPPY_BUILD_TESTS=OFF
- SNAPPY_BUILD_BENCHMARKS=OFF
- BUILD_SHARED_LIBS=OFF
-)
+set(GTEST_FOUND FALSE)
diff --git a/cmake/snappy.cmake b/cmake/modules/FindGflags.cmake
similarity index 74%
copy from cmake/snappy.cmake
copy to cmake/modules/FindGflags.cmake
index 72e587a..1b9ef10 100644
--- a/cmake/snappy.cmake
+++ b/cmake/modules/FindGflags.cmake
@@ -15,17 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-include_guard()
+# used for `find_package(Gflags)` mechanism in snappy
-include(cmake/utils.cmake)
-
-FetchContent_DeclareGitHubWithMirror(snappy
- google/snappy 1.1.7
- MD5=40a371a653b7bb5a47df59b937b78557
-)
-
-FetchContent_MakeAvailableWithArgs(snappy
- SNAPPY_BUILD_TESTS=OFF
- SNAPPY_BUILD_BENCHMARKS=OFF
- BUILD_SHARED_LIBS=OFF
-)
+set(GFLAGS_FOUND FALSE)
diff --git a/cmake/snappy.cmake b/cmake/snappy.cmake
index 72e587a..f4111f1 100644
--- a/cmake/snappy.cmake
+++ b/cmake/snappy.cmake
@@ -25,6 +25,7 @@ FetchContent_DeclareGitHubWithMirror(snappy
)
FetchContent_MakeAvailableWithArgs(snappy
+ CMAKE_MODULE_PATH=${PROJECT_SOURCE_DIR}/cmake/modules
SNAPPY_BUILD_TESTS=OFF
SNAPPY_BUILD_BENCHMARKS=OFF
BUILD_SHARED_LIBS=OFF