From 7eebbded25d5518bb6bc33ac091a671ede57caa4 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Wed, 6 Oct 2021 18:46:53 -0500 Subject: [PATCH] Properly check if the OS is Windows --- conan/tools/cmake/toolchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan/tools/cmake/toolchain.py b/conan/tools/cmake/toolchain.py index 3caf3e647bf..07bec1ee933 100644 --- a/conan/tools/cmake/toolchain.py +++ b/conan/tools/cmake/toolchain.py @@ -145,7 +145,7 @@ def context(self): if fpic is None: return None os_ = self._conanfile.settings.get_safe("os") - if os_ and "Windows" in os_: + if os_ == "Windows": self._conanfile.output.warn("Toolchain: Ignoring fPIC option defined for Windows") return None shared = self._conanfile.options.get_safe("shared")