From: Zeyi (Rice) Fan Date: Sat, 4 Jun 2022 02:20:34 +0000 (-0700) Subject: cmake: add an option to skip thirdparty.inc on Windows (#10110) X-Git-Tag: v7.4.3~71 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c1018b75160c7b1db38d83c94980d4c595b19b6c;p=rocksdb.git 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 --- 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