From 5c331709285431bcab9529182e9d59daaa481cc3 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 26 Dec 2019 16:30:05 -0300 Subject: [PATCH 1/2] #410 fPIC is true by default Signed-off-by: Uilian Ries --- recipes/rocksdb/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/rocksdb/all/conanfile.py b/recipes/rocksdb/all/conanfile.py index 6156446d2926ff..bebfb308e399a4 100644 --- a/recipes/rocksdb/all/conanfile.py +++ b/recipes/rocksdb/all/conanfile.py @@ -24,7 +24,7 @@ class RocksDB(ConanFile): } default_options = { "shared": False, - "fPIC": False, + "fPIC": True, "lite": False, "with_snappy": False, "with_lz4": False, From ae454cda8171718dbbe4a654b1a2685c5dd9953f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 26 Dec 2019 16:35:48 -0300 Subject: [PATCH 2/2] #410 Rocksdb requires msvc15 at least https://github.com/facebook/rocksdb/wiki/Building-on-Windows Signed-off-by: Uilian Ries --- recipes/rocksdb/all/conanfile.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/rocksdb/all/conanfile.py b/recipes/rocksdb/all/conanfile.py index bebfb308e399a4..e06389e185ea8e 100644 --- a/recipes/rocksdb/all/conanfile.py +++ b/recipes/rocksdb/all/conanfile.py @@ -1,4 +1,6 @@ from conans import ConanFile, CMake, tools +from conans.tools import Version +from conans.errors import ConanInvalidConfiguration import os @@ -48,6 +50,12 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + def configure(self): + if self.settings.os == "Windows" and \ + self.settings.compiler == "Visual Studio" and \ + Version(self.settings.compiler.version) < "15": + raise ConanInvalidConfiguration("Rocksdb requires Visual Studio 15 or later.") + def source(self): tools.get(**self.conan_data["sources"][self.version]) extracted_dir = "rocksdb-" + self.version