From a1aaf73115832c3deab0f1d23b90772f8c74036e Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Mon, 2 Jun 2025 14:03:02 -0400 Subject: [PATCH] cmake: Ensure WITH_DECIMAL_CONTEXTVAR warning check is reported when expected Fixes the following warning: ``` CMake Warning (dev) at CMakeLists.txt:466 (message): WITH_DECIMAL_CONTEXTVAR option is *NOT* supported with Python < 3.8. Current version is 3.7.17 This warning is for project developers. Use -Wno-dev to suppress it. ``` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ada880da..405f84fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -450,7 +450,7 @@ endif() if(PY_VERSION VERSION_GREATER_EQUAL "3.8") option(WITH_DECIMAL_CONTEXTVAR "Build _decimal module using a coroutine-local rather than a thread-local context" ON) else() - if(DEFINED WITH_C_LOCALE_COERCION) + if(DEFINED WITH_DECIMAL_CONTEXTVAR) message(AUTHOR_WARNING "WITH_DECIMAL_CONTEXTVAR option is *NOT* supported with Python < 3.8. Current version is ${PY_VERSION}") endif() endif()