summaryrefslogtreecommitdiff
path: root/cmake/Modules/GrPython.cmake
diff options
context:
space:
mode:
authorTom Rondeau2011-10-24 18:29:23 -0400
committerTom Rondeau2011-10-24 18:29:23 -0400
commitb94cdc40cadac5d9e074f9a8033584bd6a263a15 (patch)
treeb5affa85c2afb15fcee0e9420a7dfee2b48369e3 /cmake/Modules/GrPython.cmake
parent50c1e2e35b8ede2798753700a92091c0cb5f0267 (diff)
downloadgnuradio-b94cdc40cadac5d9e074f9a8033584bd6a263a15.tar.gz
gnuradio-b94cdc40cadac5d9e074f9a8033584bd6a263a15.tar.bz2
gnuradio-b94cdc40cadac5d9e074f9a8033584bd6a263a15.zip
build: making cmake build pyo files during install.
Diffstat (limited to 'cmake/Modules/GrPython.cmake')
-rw-r--r--cmake/Modules/GrPython.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake
index 51cd4bfb0..10e93ed75 100644
--- a/cmake/Modules/GrPython.cmake
+++ b/cmake/Modules/GrPython.cmake
@@ -149,6 +149,10 @@ function(GR_PYTHON_INSTALL)
)
endforeach(pyfile)
+ # Creates .pyo files
+ install(CODE "MESSAGE(\"-- Optimizing: ${CMAKE_INSTALL_PREFIX}/${GR_PYTHON_INSTALL_DESTINATION}\")")
+ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m compileall -q ${CMAKE_INSTALL_PREFIX}/${GR_PYTHON_INSTALL_DESTINATION})")
+
####################################################################
elseif(GR_PYTHON_INSTALL_PROGRAMS)
####################################################################