From c1018b75160c7b1db38d83c94980d4c595b19b6c Mon Sep 17 00:00:00 2001 From: "Zeyi (Rice) Fan" Date: Fri, 3 Jun 2022 19:20:34 -0700 Subject: [PATCH] cmake: add an option to skip thirdparty.inc on Windows (#10110) Summary: When building RocksDB with getdeps on Windows, `thirdparty.inc` get in the way since `FindXXXX.cmake` are working properly now. This PR adds an option to skip that file when building RocksDB so we can disable it. FB: see [D36905191](https://www.internalfb.com/diff/D36905191). Pull Request resolved: https://github.com/facebook/rocksdb/pull/10110 Reviewed By: siying Differential Revision: D36913882 Pulled By: fanzeyi fbshipit-source-id: 33d36841dc0d4fe87f51e1d9fd2b158a3adab88f --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b6cb9e16..10f8b1ede 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,11 @@ include(CMakeDependentOption) if(MSVC) option(WITH_GFLAGS "build with GFlags" OFF) option(WITH_XPRESS "build with windows built in compression" OFF) - include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc) + option(ROCKSDB_SKIP_THIRDPARTY "skip thirdparty.inc" OFF) + + if(NOT ROCKSDB_SKIP_THIRDPARTY) + include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc) + endif() else() if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" AND NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD") # FreeBSD has jemalloc as default malloc