From f75a71117895f2ca61e3bde935df5db24d7e5360 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Wed, 10 Feb 2021 11:20:49 -0700 Subject: CMake/Deps: Fix building cython on windows For the debug version of cython pip was trying to link against the release version of python for some strange reason. Passing some flags to explicitly target the debug version fixes the issue. Given other platforms do not have different builds for debug/release this is not an issue there. --- build_files/build_environment/cmake/python_site_packages.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/build_environment/cmake/python_site_packages.cmake b/build_files/build_environment/cmake/python_site_packages.cmake index 58d95326ee9..a3b9c3bf796 100644 --- a/build_files/build_environment/cmake/python_site_packages.cmake +++ b/build_files/build_environment/cmake/python_site_packages.cmake @@ -16,12 +16,16 @@ # # ***** END GPL LICENSE BLOCK ***** +if(WIN32 AND BUILD_MODE STREQUAL Debug) + set(SITE_PACKAGES_EXTRA --global-option build --global-option --debug) +endif() + ExternalProject_Add(external_python_site_packages DOWNLOAD_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" PREFIX ${BUILD_DIR}/site_packages - INSTALL_COMMAND ${PYTHON_BINARY} -m pip install cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: + INSTALL_COMMAND ${PYTHON_BINARY} -m pip install ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: ) add_dependencies( -- cgit v1.2.3