From: abn Date: Mon, 11 Apr 2016 12:26:56 +0000 (+0200) Subject: Fixing PYC compilation: should fail when invalid Python. X-Git-Tag: V8_1_0a1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8fef0300f8cc7181387393006484ba81d74ed4a2;p=modules%2Fkernel.git Fixing PYC compilation: should fail when invalid Python. --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 5a94723fb..f78ffe4ac 100644 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -136,13 +136,13 @@ MACRO(SALOME_INSTALL_SCRIPTS file_list path) LIST(APPEND _all_pyo ${_pyo_file}) ADD_CUSTOM_COMMAND( OUTPUT ${_pyc_file} - COMMAND ${PYTHON_EXECUTABLE} -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyc_file}' )" + COMMAND ${PYTHON_EXECUTABLE} -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyc_file}', doraise=True )" DEPENDS ${PREFIX}${file} VERBATIM ) ADD_CUSTOM_COMMAND( OUTPUT ${_pyo_file} - COMMAND ${PYTHON_EXECUTABLE} -O -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyo_file}' )" + COMMAND ${PYTHON_EXECUTABLE} -O -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyo_file}', doraise=True )" DEPENDS ${PREFIX}${file} VERBATIM )