From: abn Date: Tue, 6 Jan 2015 14:33:22 +0000 (+0100) Subject: Fixing TIMESTAMP mechanism for PY file compilation X-Git-Tag: V7_5_1rc1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b7a877aa7c9421627a2a8fb10f01d9d5924d533f;p=modules%2Fkernel.git Fixing TIMESTAMP mechanism for PY file compilation --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 4d51741ef..205f7893a 100644 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -129,9 +129,9 @@ MACRO(SALOME_INSTALL_SCRIPTS file_list path) ELSE(${CMAKE_VERSION} VERSION_LESS "2.8.11") GET_FILENAME_COMPONENT(file_we ${file_name} NAME_WE) INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file_name}')\")") - INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_CURRENT_SOURCE_DIR}/${file}\" py_time)") - INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyc\" pyc_time)") - INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyo\" pyo_time)") + INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_name}\" py_time)") + INSTALL(CODE "IF(EXISTS \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyc\") \n FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyc\" pyc_time) \n ELSE()\n SET(pyc_time 0) \n ENDIF() ") + INSTALL(CODE "IF(EXISTS \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyo\") \n FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyo\" pyo_time) \n ELSE()\n SET(pyo_time 0) \n ENDIF() ") #INSTALL(CODE "MESSAGE(STATUS \"\${py_time} \${pyc_time} \")") INSTALL(CODE "STRING(COMPARE LESS \${pyc_time} \${py_time} to_install_pyc)") INSTALL(CODE "STRING(COMPARE LESS \${pyo_time} \${py_time} to_install_pyo)")