We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[question] Using redis-plus-plus with TLS/SSL on
### What is your question?

Hi, I'm having difficulty using Conan to include a version of redis-plus-plus built with TLS enabled in my project. It seems like redis-plus-plus's conan recipe has a `with_tls` option that should enable the support. However, this depends on hiredis being built with SSL enabled. The conan recipe for hiredis seems to have a `with_ssl` option that's supposed to do exactly that, but I could not get it to work. 

Here's my conanfile.py:

```
from conan import ConanFile, tools
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout

class HelloConan(ConanFile):
    name = "myproject"
    version = "0.0.1"
    settings = "os", "compiler", "build_type", "arch"


    def layout(self):
        cmake_layout(self)

    def generate(self):
        deps = CMakeDeps(self)
        deps.generate()
        tc = CMakeToolchain(self)
        tc.generate()

    def configure(self):
        self.options["hiredis"]["with_ssl"] = True
        self.options["redis-plus-plus"]["with_tls"] = True

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()

    def package(self):
        cmake = CMake(self)
        cmake.install()

    def requirements(self):
        self.requires("redis-plus-plus/1.3.11")
        self.requires("hiredis/1.2.0")
```

The error message I get is 
```
CMake Error at 
/home/ago/.conan2/p/b/redis08573fb8e514a/b/build/Release/generators/cmakedeps_macros.cmake:67 (message):
  Library 'hiredis_ssl' not found in package.  If 'hiredis_ssl' is a system
  library, declare it with 'cpp_info.system_libs' property
```

I also tried not including hiredis in the requirements and/or configure functions in my conanfile.py. The result was 

```
ERROR: There are invalid packages:
redis-plus-plus/1.3.11: Invalid: redis-plus-plus:with_tls=True requires hiredis:with_ssl=True
```

I'd really appreciate if anyone could guide me in the right direction to get redis-plus-plus built with the with_tls option enabled.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `recipes/hiredis/all/conanfile.py`
Content:
```
1 from conan import ConanFile
2 from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
3 from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm
4 from conan.tools.scm import Version
5 from conan.tools.microsoft import is_msvc
6 import os
7 
8 required_conan_version = ">=1.53.0"
9 
10 
11 class HiredisConan(ConanFile):
12     name = "hiredis"
13     description = "Hiredis is a minimalistic C client library for the Redis database."
14     license = "BSD-3-Clause"
15     topics = ("hiredis", "redis", "client", "database")
16     homepage = "https://github.com/redis/hiredis"
17     url = "https://github.com/conan-io/conan-center-index"
18     package_type = "library"
19     settings = "os", "arch", "compiler", "build_type"
20     options = {
21         "shared": [True, False],
22         "fPIC": [True, False],
23         "with_ssl": [True, False],
24     }
25     default_options = {
26         "shared": False,
27         "fPIC": True,
28         "with_ssl": False,
29     }
30 
31     def export_sources(self):
32         export_conandata_patches(self)
33 
34     def config_options(self):
35         if self.settings.os == "Windows":
36             del self.options.fPIC
37 
38     def configure(self):
39         if self.options.shared:
40             self.options.rm_safe("fPIC")
41         self.settings.compiler.rm_safe("libcxx")
42         self.settings.compiler.rm_safe("cppstd")
43 
44     def layout(self):
45         cmake_layout(self, src_folder="src")
46 
47     def requirements(self):
48         if self.options.with_ssl:
49             self.requires("openssl/[>=1.1 <4]")
50 
51     def source(self):
52         get(self, **self.conan_data["sources"][self.version], strip_root=True)
53 
54     def generate(self):
55         tc = CMakeToolchain(self)
56         # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option()
57         if Version(self.version) >= "1.2.0":
58             tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared
59         tc.variables["ENABLE_SSL"] = self.options.with_ssl
60         tc.variables["DISABLE_TESTS"] = True
61         tc.variables["ENABLE_EXAMPLES"] = False
62         tc.generate()
63         deps = CMakeDeps(self)
64         deps.generate()
65 
66     def build(self):
67         apply_conandata_patches(self)
68         cmake = CMake(self)
69         cmake.configure()
70         cmake.build()
71 
72     def package(self):
73         copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
74         cmake = CMake(self)
75         cmake.install()
76         rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
77         rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
78         rmdir(self, os.path.join(self.package_folder, "share"))
79         rmdir(self, os.path.join(self.package_folder, "build"))
80         rm(self, "*.pdb", os.path.join(self.package_folder, "bin"))
81 
82     def package_info(self):
83         self.cpp_info.set_property("cmake_file_name", "hiredis")
84 
85         suffix = ""
86         if Version(self.version) >= "1.1.0":
87             if is_msvc(self) and not self.options.shared and Version(self.version) < "1.2.0":
88                 suffix += "_static"
89             if self.settings.build_type == "Debug":
90                 suffix += "d"
91 
92         # hiredis
93         self.cpp_info.components["hiredislib"].set_property("cmake_target_name", "hiredis::hiredis")
94         self.cpp_info.components["hiredislib"].set_property("pkg_config_name", "hiredis")
95         self.cpp_info.components["hiredislib"].names["cmake_find_package"] = "hiredis"
96         self.cpp_info.components["hiredislib"].names["cmake_find_package_multi"] = "hiredis"
97         self.cpp_info.components["hiredislib"].libs = [f"hiredis{suffix}"]
98         if self.settings.os == "Windows":
99             self.cpp_info.components["hiredislib"].system_libs = ["ws2_32"]
100         # hiredis_ssl
101         if self.options.with_ssl:
102             self.cpp_info.components["hiredis_ssl"].set_property("cmake_target_name", "hiredis::hiredis_ssl")
103             self.cpp_info.components["hiredis_ssl"].set_property("pkg_config_name", "hiredis_ssl")
104             self.cpp_info.components["hiredis_ssl"].names["cmake_find_package"] = "hiredis_ssl"
105             self.cpp_info.components["hiredis_ssl"].names["cmake_find_package_multi"] = "hiredis_ssl"
106             self.cpp_info.components["hiredis_ssl"].libs = [f"hiredis_ssl{suffix}"]
107             self.cpp_info.components["hiredis_ssl"].requires = ["openssl::ssl"]
108             if self.settings.os == "Windows":
109                 self.cpp_info.components["hiredis_ssl"].requires.append("hiredislib")
110 
111             # These cmake_target_name and pkg_config_name are unofficial. It avoids conflicts
112             # in conan generators between global target/pkg-config and hiredislib component.
113             # TODO: eventually remove the cmake_target_name trick if conan can implement smarter logic
114             # in CMakeDeps when a downstream recipe requires another recipe globally
115             # (link to all components directly instead of global target)
116             self.cpp_info.set_property("cmake_target_name", "hiredis::hiredis_all_unofficial")
117             self.cpp_info.set_property("pkg_config_name", "hiredis_all_unofficial")
118
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/recipes/hiredis/all/conanfile.py b/recipes/hiredis/all/conanfile.py
--- a/recipes/hiredis/all/conanfile.py
+++ b/recipes/hiredis/all/conanfile.py
@@ -56,9 +56,9 @@
         # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option()
         if Version(self.version) >= "1.2.0":
             tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared
-        tc.variables["ENABLE_SSL"] = self.options.with_ssl
-        tc.variables["DISABLE_TESTS"] = True
-        tc.variables["ENABLE_EXAMPLES"] = False
+        tc.cache_variables["ENABLE_SSL"] = self.options.with_ssl
+        tc.cache_variables["DISABLE_TESTS"] = True
+        tc.cache_variables["ENABLE_EXAMPLES"] = False
         tc.generate()
         deps = CMakeDeps(self)
         deps.generate()

{"golden_diff": "diff --git a/recipes/hiredis/all/conanfile.py b/recipes/hiredis/all/conanfile.py\n--- a/recipes/hiredis/all/conanfile.py\n+++ b/recipes/hiredis/all/conanfile.py\n@@ -56,9 +56,9 @@\n         # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option()\n         if Version(self.version) >= \"1.2.0\":\n             tc.cache_variables[\"BUILD_SHARED_LIBS\"] = self.options.shared\n-        tc.variables[\"ENABLE_SSL\"] = self.options.with_ssl\n-        tc.variables[\"DISABLE_TESTS\"] = True\n-        tc.variables[\"ENABLE_EXAMPLES\"] = False\n+        tc.cache_variables[\"ENABLE_SSL\"] = self.options.with_ssl\n+        tc.cache_variables[\"DISABLE_TESTS\"] = True\n+        tc.cache_variables[\"ENABLE_EXAMPLES\"] = False\n         tc.generate()\n         deps = CMakeDeps(self)\n         deps.generate()\n", "issue": "[question] Using redis-plus-plus with TLS/SSL on\n### What is your question?\n\nHi, I'm having difficulty using Conan to include a version of redis-plus-plus built with TLS enabled in my project. It seems like redis-plus-plus's conan recipe has a `with_tls` option that should enable the support. However, this depends on hiredis being built with SSL enabled. The conan recipe for hiredis seems to have a `with_ssl` option that's supposed to do exactly that, but I could not get it to work. \r\n\r\nHere's my conanfile.py:\r\n\r\n```\r\nfrom conan import ConanFile, tools\r\nfrom conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout\r\n\r\nclass HelloConan(ConanFile):\r\n    name = \"myproject\"\r\n    version = \"0.0.1\"\r\n    settings = \"os\", \"compiler\", \"build_type\", \"arch\"\r\n\r\n\r\n    def layout(self):\r\n        cmake_layout(self)\r\n\r\n    def generate(self):\r\n        deps = CMakeDeps(self)\r\n        deps.generate()\r\n        tc = CMakeToolchain(self)\r\n        tc.generate()\r\n\r\n    def configure(self):\r\n        self.options[\"hiredis\"][\"with_ssl\"] = True\r\n        self.options[\"redis-plus-plus\"][\"with_tls\"] = True\r\n\r\n    def build(self):\r\n        cmake = CMake(self)\r\n        cmake.configure()\r\n        cmake.build()\r\n\r\n    def package(self):\r\n        cmake = CMake(self)\r\n        cmake.install()\r\n\r\n    def requirements(self):\r\n        self.requires(\"redis-plus-plus/1.3.11\")\r\n        self.requires(\"hiredis/1.2.0\")\r\n```\r\n\r\nThe error message I get is \r\n```\r\nCMake Error at \r\n/home/ago/.conan2/p/b/redis08573fb8e514a/b/build/Release/generators/cmakedeps_macros.cmake:67 (message):\r\n  Library 'hiredis_ssl' not found in package.  If 'hiredis_ssl' is a system\r\n  library, declare it with 'cpp_info.system_libs' property\r\n```\r\n\r\nI also tried not including hiredis in the requirements and/or configure functions in my conanfile.py. The result was \r\n\r\n```\r\nERROR: There are invalid packages:\r\nredis-plus-plus/1.3.11: Invalid: redis-plus-plus:with_tls=True requires hiredis:with_ssl=True\r\n```\r\n\r\nI'd really appreciate if anyone could guide me in the right direction to get redis-plus-plus built with the with_tls option enabled.\n", "before_files": [{"content": "from conan import ConanFile\nfrom conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout\nfrom conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm\nfrom conan.tools.scm import Version\nfrom conan.tools.microsoft import is_msvc\nimport os\n\nrequired_conan_version = \">=1.53.0\"\n\n\nclass HiredisConan(ConanFile):\n    name = \"hiredis\"\n    description = \"Hiredis is a minimalistic C client library for the Redis database.\"\n    license = \"BSD-3-Clause\"\n    topics = (\"hiredis\", \"redis\", \"client\", \"database\")\n    homepage = \"https://github.com/redis/hiredis\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    package_type = \"library\"\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\n        \"shared\": [True, False],\n        \"fPIC\": [True, False],\n        \"with_ssl\": [True, False],\n    }\n    default_options = {\n        \"shared\": False,\n        \"fPIC\": True,\n        \"with_ssl\": False,\n    }\n\n    def export_sources(self):\n        export_conandata_patches(self)\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.options.shared:\n            self.options.rm_safe(\"fPIC\")\n        self.settings.compiler.rm_safe(\"libcxx\")\n        self.settings.compiler.rm_safe(\"cppstd\")\n\n    def layout(self):\n        cmake_layout(self, src_folder=\"src\")\n\n    def requirements(self):\n        if self.options.with_ssl:\n            self.requires(\"openssl/[>=1.1 <4]\")\n\n    def source(self):\n        get(self, **self.conan_data[\"sources\"][self.version], strip_root=True)\n\n    def generate(self):\n        tc = CMakeToolchain(self)\n        # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option()\n        if Version(self.version) >= \"1.2.0\":\n            tc.cache_variables[\"BUILD_SHARED_LIBS\"] = self.options.shared\n        tc.variables[\"ENABLE_SSL\"] = self.options.with_ssl\n        tc.variables[\"DISABLE_TESTS\"] = True\n        tc.variables[\"ENABLE_EXAMPLES\"] = False\n        tc.generate()\n        deps = CMakeDeps(self)\n        deps.generate()\n\n    def build(self):\n        apply_conandata_patches(self)\n        cmake = CMake(self)\n        cmake.configure()\n        cmake.build()\n\n    def package(self):\n        copy(self, \"COPYING\", src=self.source_folder, dst=os.path.join(self.package_folder, \"licenses\"))\n        cmake = CMake(self)\n        cmake.install()\n        rmdir(self, os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n        rmdir(self, os.path.join(self.package_folder, \"lib\", \"cmake\"))\n        rmdir(self, os.path.join(self.package_folder, \"share\"))\n        rmdir(self, os.path.join(self.package_folder, \"build\"))\n        rm(self, \"*.pdb\", os.path.join(self.package_folder, \"bin\"))\n\n    def package_info(self):\n        self.cpp_info.set_property(\"cmake_file_name\", \"hiredis\")\n\n        suffix = \"\"\n        if Version(self.version) >= \"1.1.0\":\n            if is_msvc(self) and not self.options.shared and Version(self.version) < \"1.2.0\":\n                suffix += \"_static\"\n            if self.settings.build_type == \"Debug\":\n                suffix += \"d\"\n\n        # hiredis\n        self.cpp_info.components[\"hiredislib\"].set_property(\"cmake_target_name\", \"hiredis::hiredis\")\n        self.cpp_info.components[\"hiredislib\"].set_property(\"pkg_config_name\", \"hiredis\")\n        self.cpp_info.components[\"hiredislib\"].names[\"cmake_find_package\"] = \"hiredis\"\n        self.cpp_info.components[\"hiredislib\"].names[\"cmake_find_package_multi\"] = \"hiredis\"\n        self.cpp_info.components[\"hiredislib\"].libs = [f\"hiredis{suffix}\"]\n        if self.settings.os == \"Windows\":\n            self.cpp_info.components[\"hiredislib\"].system_libs = [\"ws2_32\"]\n        # hiredis_ssl\n        if self.options.with_ssl:\n            self.cpp_info.components[\"hiredis_ssl\"].set_property(\"cmake_target_name\", \"hiredis::hiredis_ssl\")\n            self.cpp_info.components[\"hiredis_ssl\"].set_property(\"pkg_config_name\", \"hiredis_ssl\")\n            self.cpp_info.components[\"hiredis_ssl\"].names[\"cmake_find_package\"] = \"hiredis_ssl\"\n            self.cpp_info.components[\"hiredis_ssl\"].names[\"cmake_find_package_multi\"] = \"hiredis_ssl\"\n            self.cpp_info.components[\"hiredis_ssl\"].libs = [f\"hiredis_ssl{suffix}\"]\n            self.cpp_info.components[\"hiredis_ssl\"].requires = [\"openssl::ssl\"]\n            if self.settings.os == \"Windows\":\n                self.cpp_info.components[\"hiredis_ssl\"].requires.append(\"hiredislib\")\n\n            # These cmake_target_name and pkg_config_name are unofficial. It avoids conflicts\n            # in conan generators between global target/pkg-config and hiredislib component.\n            # TODO: eventually remove the cmake_target_name trick if conan can implement smarter logic\n            # in CMakeDeps when a downstream recipe requires another recipe globally\n            # (link to all components directly instead of global target)\n            self.cpp_info.set_property(\"cmake_target_name\", \"hiredis::hiredis_all_unofficial\")\n            self.cpp_info.set_property(\"pkg_config_name\", \"hiredis_all_unofficial\")\n", "path": "recipes/hiredis/all/conanfile.py"}], "after_files": [{"content": "from conan import ConanFile\nfrom conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout\nfrom conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm\nfrom conan.tools.scm import Version\nfrom conan.tools.microsoft import is_msvc\nimport os\n\nrequired_conan_version = \">=1.53.0\"\n\n\nclass HiredisConan(ConanFile):\n    name = \"hiredis\"\n    description = \"Hiredis is a minimalistic C client library for the Redis database.\"\n    license = \"BSD-3-Clause\"\n    topics = (\"hiredis\", \"redis\", \"client\", \"database\")\n    homepage = \"https://github.com/redis/hiredis\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    package_type = \"library\"\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\n        \"shared\": [True, False],\n        \"fPIC\": [True, False],\n        \"with_ssl\": [True, False],\n    }\n    default_options = {\n        \"shared\": False,\n        \"fPIC\": True,\n        \"with_ssl\": False,\n    }\n\n    def export_sources(self):\n        export_conandata_patches(self)\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.options.shared:\n            self.options.rm_safe(\"fPIC\")\n        self.settings.compiler.rm_safe(\"libcxx\")\n        self.settings.compiler.rm_safe(\"cppstd\")\n\n    def layout(self):\n        cmake_layout(self, src_folder=\"src\")\n\n    def requirements(self):\n        if self.options.with_ssl:\n            self.requires(\"openssl/[>=1.1 <4]\")\n\n    def source(self):\n        get(self, **self.conan_data[\"sources\"][self.version], strip_root=True)\n\n    def generate(self):\n        tc = CMakeToolchain(self)\n        # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option()\n        if Version(self.version) >= \"1.2.0\":\n            tc.cache_variables[\"BUILD_SHARED_LIBS\"] = self.options.shared\n        tc.cache_variables[\"ENABLE_SSL\"] = self.options.with_ssl\n        tc.cache_variables[\"DISABLE_TESTS\"] = True\n        tc.cache_variables[\"ENABLE_EXAMPLES\"] = False\n        tc.generate()\n        deps = CMakeDeps(self)\n        deps.generate()\n\n    def build(self):\n        apply_conandata_patches(self)\n        cmake = CMake(self)\n        cmake.configure()\n        cmake.build()\n\n    def package(self):\n        copy(self, \"COPYING\", src=self.source_folder, dst=os.path.join(self.package_folder, \"licenses\"))\n        cmake = CMake(self)\n        cmake.install()\n        rmdir(self, os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n        rmdir(self, os.path.join(self.package_folder, \"lib\", \"cmake\"))\n        rmdir(self, os.path.join(self.package_folder, \"share\"))\n        rmdir(self, os.path.join(self.package_folder, \"build\"))\n        rm(self, \"*.pdb\", os.path.join(self.package_folder, \"bin\"))\n\n    def package_info(self):\n        self.cpp_info.set_property(\"cmake_file_name\", \"hiredis\")\n\n        suffix = \"\"\n        if Version(self.version) >= \"1.1.0\":\n            if is_msvc(self) and not self.options.shared and Version(self.version) < \"1.2.0\":\n                suffix += \"_static\"\n            if self.settings.build_type == \"Debug\":\n                suffix += \"d\"\n\n        # hiredis\n        self.cpp_info.components[\"hiredislib\"].set_property(\"cmake_target_name\", \"hiredis::hiredis\")\n        self.cpp_info.components[\"hiredislib\"].set_property(\"pkg_config_name\", \"hiredis\")\n        self.cpp_info.components[\"hiredislib\"].names[\"cmake_find_package\"] = \"hiredis\"\n        self.cpp_info.components[\"hiredislib\"].names[\"cmake_find_package_multi\"] = \"hiredis\"\n        self.cpp_info.components[\"hiredislib\"].libs = [f\"hiredis{suffix}\"]\n        if self.settings.os == \"Windows\":\n            self.cpp_info.components[\"hiredislib\"].system_libs = [\"ws2_32\"]\n        # hiredis_ssl\n        if self.options.with_ssl:\n            self.cpp_info.components[\"hiredis_ssl\"].set_property(\"cmake_target_name\", \"hiredis::hiredis_ssl\")\n            self.cpp_info.components[\"hiredis_ssl\"].set_property(\"pkg_config_name\", \"hiredis_ssl\")\n            self.cpp_info.components[\"hiredis_ssl\"].names[\"cmake_find_package\"] = \"hiredis_ssl\"\n            self.cpp_info.components[\"hiredis_ssl\"].names[\"cmake_find_package_multi\"] = \"hiredis_ssl\"\n            self.cpp_info.components[\"hiredis_ssl\"].libs = [f\"hiredis_ssl{suffix}\"]\n            self.cpp_info.components[\"hiredis_ssl\"].requires = [\"openssl::ssl\"]\n            if self.settings.os == \"Windows\":\n                self.cpp_info.components[\"hiredis_ssl\"].requires.append(\"hiredislib\")\n\n            # These cmake_target_name and pkg_config_name are unofficial. It avoids conflicts\n            # in conan generators between global target/pkg-config and hiredislib component.\n            # TODO: eventually remove the cmake_target_name trick if conan can implement smarter logic\n            # in CMakeDeps when a downstream recipe requires another recipe globally\n            # (link to all components directly instead of global target)\n            self.cpp_info.set_property(\"cmake_target_name\", \"hiredis::hiredis_all_unofficial\")\n            self.cpp_info.set_property(\"pkg_config_name\", \"hiredis_all_unofficial\")\n", "path": "recipes/hiredis/all/conanfile.py"}]}