From 62234b4f86eea914b8bb802f5d5f3c110f5db92a Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Mon, 27 Sep 2010 16:56:16 -0300 Subject: Made the use of xvfb-run with QtGui tests optional. To enable it run CMake with the USE_XVFB set to 1. Default is 0. --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c50500ad..76d12a2f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,11 +11,14 @@ find_package(GeneratorRunner 0.6 REQUIRED) find_package(Shiboken 0.5 REQUIRED) find_package(Qt4 4.5.0 REQUIRED) -find_program(XVFB_RUN NAMES xvfb-run) set(XVFB_EXEC "") -if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") - set(XVFB_EXEC ${XVFB_RUN}) - message("Using xvfb-run to perform QtGui tests.") +option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtGui tests popping windows on the screen." FALSE) +if(USE_XVFB) + find_program(XVFB_RUN NAMES xvfb-run) + if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") + set(XVFB_EXEC ${XVFB_RUN}) + message("Using xvfb-run to perform QtGui tests.") + endif() endif() option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE) -- cgit v1.2.3