Fix unintentional escaping of character on Windows (#1574) (#1575)

This commit is contained in:
Ryota Suzuki 2018-10-24 18:18:04 +09:00 committed by Wenzel Jakob
parent 111b25b260
commit 1377fbf73c

View File

@ -100,6 +100,9 @@ if(NOT _PYTHON_SUCCESS MATCHES 0)
endif() endif()
# Convert the process output into a list # Convert the process output into a list
if(WIN32)
string(REGEX REPLACE "\\\\" "/" _PYTHON_VALUES ${_PYTHON_VALUES})
endif()
string(REGEX REPLACE ";" "\\\\;" _PYTHON_VALUES ${_PYTHON_VALUES}) string(REGEX REPLACE ";" "\\\\;" _PYTHON_VALUES ${_PYTHON_VALUES})
string(REGEX REPLACE "\n" ";" _PYTHON_VALUES ${_PYTHON_VALUES}) string(REGEX REPLACE "\n" ";" _PYTHON_VALUES ${_PYTHON_VALUES})
list(GET _PYTHON_VALUES 0 _PYTHON_VERSION_LIST) list(GET _PYTHON_VALUES 0 _PYTHON_VERSION_LIST)