]> git.lyx.org Git - features.git/commitdiff
Cmake build: autotests
authorKornel Benko <kornel@lyx.org>
Wed, 12 Dec 2012 17:23:25 +0000 (18:23 +0100)
committerKornel Benko <kornel@lyx.org>
Wed, 12 Dec 2012 17:23:25 +0000 (18:23 +0100)
Make the export test available to all, since it is independent of X11

development/autotests/CMakeLists.txt
development/autotests/export.cmake

index 3a85964935b9ddb82f22e789a4361b68a683bb43..7bdd2efbc0f941b9f3c8dec233f59eeabebc9a69 100644 (file)
@@ -4,9 +4,16 @@
 # Copyright (c) 2012 Kornel Benko kornel@lyx.org
 #
 
-if(UNIX)
+if(Q_WS_X11)
+  # Make sure, the needed programs are in PATH
+  find_program(PCREGREP_EXE "pcregrep")
+  find_program(WMCTRL_EXE "wmctrl")
+  # This is needed to build xvkbd
+  # Programs pcregrep wmctrl and xvkbd are used in subsequent scripts
+  # while testing
   find_package(X11)
-  if(X11_FOUND)
+  if(X11_FOUND AND PCREGREP_EXE AND WMCTRL_EXE)
+    message(STATUS "PCREGREP_EXE and WMCTRL_EXE found")
     project(autotests)
 
     add_subdirectory(xvkbd)
@@ -36,9 +43,9 @@ if(UNIX)
         -DLOCALE_DIR=${LOCALE_DIR}
         -P ${TOP_SRC_DIR}/development/autotests/single-test.cmake)
     endforeach()
-    add_test(NAME lyx_export
-      WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
-      COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${TOP_SRC_DIR} -Dlyx=${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/lyx -P "${TOP_SRC_DIR}/development/autotests/export.cmake")
-    set_tests_properties(lyx_export PROPERTIES DEPENDS lyx)
   endif()
 endif()
+add_test(NAME lyx_export
+  WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
+  COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${TOP_SRC_DIR} -Dlyx=${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/lyx -P "${TOP_SRC_DIR}/development/autotests/export.cmake")
+set_tests_properties(lyx_export PROPERTIES DEPENDS lyx)
index b848cb42baec245ef98434e1b4871999e0c833ea..6693e097d0be7f4de48da489038e7af574d6ae98 100755 (executable)
@@ -1,4 +1,17 @@
-
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# Copyright (c) 2012 Kornel Benko kornel@lyx.org
+#
+#
+# LYX_ROOT  = ${TOP_SRC_DIR}
+# lyx       = ${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/lyx
+#
+# Script should be called like:
+# cmake -DLYX_ROOT=xxx \
+#       -Dlyx=xxx \
+#       -P "${TOP_SRC_DIR}/development/autotests/export.cmake"
+#
 file(GLOB lyx_files "${LYX_ROOT}/lib/doc/*.lyx")
 message(STATUS "lyx_files = ${lyx_files}")