Skip to content

Commit

Permalink
Avoid build time on generated files from pyside-rcc and pyside-uic.
Browse files Browse the repository at this point in the history
Fixes build compare:
[ 3218s] RPM file checksum differs.
[ 3218s] Extracting packages
[ 3232s] /usr/lib64/FreeCAD/Mod/Arch/Arch_rc.py differs (Python script, ASCII text executable, with very long lines)
[ 3232s] --- old//usr/lib64/FreeCAD/Mod/Arch/Arch_rc.py2015-01-21 20:26:34.000000000 +0000
[ 3232s] +++ new//usr/lib64/FreeCAD/Mod/Arch/Arch_rc.py2015-01-23 11:41:24.000000000 +0000
[ 3232s] @@ -2,7 +2,7 @@
[ 3232s]
[ 3232s]  # Resource object code
[ 3232s]  #
[ 3232s] -# Created: Wed Jan 21 20:26:34 2015
[ 3232s] +# Created: Fri Jan 23 11:41:24 2015
[ 3232s]  #      by: The Resource Compiler for PySide (Qt v4.8.4)
[ 3232s]  #
[ 3232s]  # WARNING! All changes made in this file will be lost!
  • Loading branch information
jobermayr committed Sep 11, 2015
1 parent 7446930 commit 2b9da83
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions cMake/FindPySideTools.cmake
Expand Up @@ -31,10 +31,20 @@ MACRO(PYSIDE_WRAP_UI outfiles)
#ADD_CUSTOM_TARGET(${it} ALL
# DEPENDS ${outfile}
#)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDEUIC4BINARY} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
if(WIN32)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDEUIC4BINARY} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else(WIN32)
# Especially on Open Build Service we don't want changing date like
# pyside-uic generates in comments at beginning.
EXECUTE_PROCESS(
COMMAND ${PYSIDEUIC4BINARY} ${infile}
COMMAND sed "/^# /d"
OUTPUT_FILE ${outfile}
)
endif(WIN32)
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH(it)
ENDMACRO (PYSIDE_WRAP_UI)
Expand All @@ -47,10 +57,20 @@ MACRO(PYSIDE_WRAP_RC outfiles)
#ADD_CUSTOM_TARGET(${it} ALL
# DEPENDS ${outfile}
#)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDERCC4BINARY} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
if(WIN32)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYSIDERCC4BINARY} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
else(WIN32)
# Especially on Open Build Service we don't want changing date like
# pyside-rcc generates in comments at beginning.
EXECUTE_PROCESS(
COMMAND ${PYSIDERCC4BINARY} ${infile}
COMMAND sed "/^# /d"
OUTPUT_FILE ${outfile}
)
endif(WIN32)
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH(it)
ENDMACRO (PYSIDE_WRAP_RC)
Expand Down

0 comments on commit 2b9da83

Please sign in to comment.