googletest: fix checking a variant condition (#44781)

Change "pthread" to "+pthread" since otherwise the spec is never satisfied and pthread is never used.
This commit is contained in:
Marcel Breyer 2024-06-20 13:59:53 +02:00 committed by GitHub
parent e91a69a756
commit ffdab20294
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,7 @@ def cmake_args(self):
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
]
args.append(self.define("gtest_disable_pthreads", not spec.satisfies("pthreads")))
args.append(self.define("gtest_disable_pthreads", not spec.satisfies("+pthreads")))
if spec.satisfies("@1.8:"):
# New style (contains both Google Mock and Google Test)
args.append(self.define("BUILD_GTEST", True))