summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorJosh Blum2011-12-14 11:21:43 -0800
committerJohnathan Corgan2011-12-14 16:57:49 -0800
commit214764eb597a8914c2935286f92b7d3e59ee0610 (patch)
tree03ee337b6aab6ffaa0465bcecffd0df2a0f4cb70 /cmake/Modules
parent543f8390edcab0201a68fabe86803b0d6f63ee34 (diff)
downloadgnuradio-214764eb597a8914c2935286f92b7d3e59ee0610.tar.gz
gnuradio-214764eb597a8914c2935286f92b7d3e59ee0610.tar.bz2
gnuradio-214764eb597a8914c2935286f92b7d3e59ee0610.zip
grc: the check for pygtk can fail with no X session
However, the module will still import and we can perform the version check. This change to the cmake python module checker will make sure that the module was actually imported, even if the act of importing throws. I believe that this change to the checker is acceptable for all other modules.
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/GrPython.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake
index efdddf371..e8e07b244 100644
--- a/cmake/Modules/GrPython.cmake
+++ b/cmake/Modules/GrPython.cmake
@@ -77,7 +77,9 @@ macro(GR_PYTHON_CHECK_MODULE desc mod cmd have)
COMMAND ${PYTHON_EXECUTABLE} -c "
#########################################
try: import ${mod}
-except: exit(-1)
+except:
+ try: ${mod}
+ except: exit(-1)
try: assert ${cmd}
except: exit(-1)
#########################################"