From 6b1c034faef6a78f7e0681f55203a0fd9774d12d Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 22 Dec 2010 19:17:02 -0200 Subject: Fix Py_DEBUG detection on Windows. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows sysconfig.get('Py_DEBUG') can return None instead of 0. Reviewer: Marcelo Lira Renato Araújo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index cfacdb844..d0891ce99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,7 @@ add_custom_target(uninstall "${CMAKE_COMMAND}" # Detect if the python libs were compiled in debug mode execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; \\ - print sysconfig.get_config_var('Py_DEBUG')" + print bool(sysconfig.get_config_var('Py_DEBUG'))" OUTPUT_VARIABLE PY_DEBUG OUTPUT_STRIP_TRAILING_WHITESPACE) -- cgit v1.2.3