Skip to content

Commit 9c95cbf

Browse files
authored
Merge pull request #1756 from jere8184/log_cmake_windows_debug
ci-cd: always force link to release python lib when configuring windows debug build
2 parents b613df7 + 7a81292 commit 9c95cbf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

buildsystem/HandlePythonOptions.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,18 @@ if(PYTHON_VER VERSION_GREATER_EQUAL 3.8 AND PYTHON_VERSION VERSION_LESS 3.9)
3939
endif()
4040

4141
set(PYEXT_LIBRARY "${PYTHON_LIBRARIES}")
42-
42+
message("PYTHON_LIBRARIES: " "${PYTHON_LIBRARIES}")
4343
#Windows always uses optimized version of Python lib
4444
if(WIN32 AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
4545
#get index of string "optimized" and increment it by 1 so index points at the path of the optimized lib
4646
list (FIND PYEXT_LIBRARY "optimized" _index)
4747
if (${_index} GREATER -1)
4848
MATH(EXPR _index "${_index}+1")
4949
list(GET PYEXT_LIBRARY ${_index} PYEXT_LIBRARY)
50-
set(force_optimized_lib_flag "--force_optimized_lib")
50+
message("force linking to python release lib
51+
instead of debug lib when cythonising")
5152
endif()
53+
set(force_optimized_lib_flag "--force_optimized_lib")
5254
endif()
5355

5456
set(PYEXT_INCLUDE_DIRS "${PYTHON_INCLUDE_DIRS};${NUMPY_INCLUDE_DIR}")

0 commit comments

Comments
 (0)