summaryrefslogtreecommitdiffstats
path: root/Modules/FindPython
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-06-29 13:11:12 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-06-29 15:07:56 (GMT)
commit9b45210b052c7c81ab84313c4a3b537e66c2a7b7 (patch)
tree91a232e58d2f8cdb52c7ed8c81c6ae49e861b8fa /Modules/FindPython
parentc24be2ffe726f876a5b4c235848b24bc3fe5f5e2 (diff)
downloadCMake-9b45210b052c7c81ab84313c4a3b537e66c2a7b7.zip
CMake-9b45210b052c7c81ab84313c4a3b537e66c2a7b7.tar.gz
CMake-9b45210b052c7c81ab84313c4a3b537e66c2a7b7.tar.bz2
FindPython: Add tests for IronPython v3
Diffstat (limited to 'Modules/FindPython')
-rw-r--r--Modules/FindPython/Support.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 76d4a9b..0f0e2af 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -981,7 +981,7 @@ function (_PYTHON_VALIDATE_COMPILER)
# retrieve python environment version from compiler
set (working_dir "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PythonCompilerVersion.dir")
- file (WRITE "${working_dir}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]]))\n")
+ file (WRITE "${working_dir}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]])); sys.stdout.flush()\n")
execute_process (COMMAND ${launcher} "${_${_PYTHON_PREFIX}_COMPILER}"
${_${_PYTHON_PREFIX}_IRON_PYTHON_COMPILER_ARCH_FLAGS}
/target:exe /embed "${working_dir}/version.py"
@@ -2520,7 +2520,7 @@ if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
# retrieve python environment version from compiler
_python_get_launcher (_${_PYTHON_PREFIX}_COMPILER_LAUNCHER COMPILER)
set (_${_PYTHON_PREFIX}_VERSION_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PythonCompilerVersion.dir")
- file (WRITE "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]]))\n")
+ file (WRITE "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]])); sys.stdout.flush()\n")
execute_process (COMMAND ${_${_PYTHON_PREFIX}_COMPILER_LAUNCHER} "${_${_PYTHON_PREFIX}_COMPILER}"
${_${_PYTHON_PREFIX}_IRON_PYTHON_COMPILER_ARCH_FLAGS}
/target:exe /embed "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py"