The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 78470fba034e1bbbd7043d9d142c501061b7547d
Author: Kornel Benko <[email protected]>
Date:   Fri Dec 14 19:47:43 2012 +0100

    Cmake build: tex2lyx
    Retrieve and name the test-cases with a globbing expression

diff --git a/src/tex2lyx/test/CMakeLists.txt b/src/tex2lyx/test/CMakeLists.txt
index ff90d11..b233bdd 100644
--- a/src/tex2lyx/test/CMakeLists.txt
+++ b/src/tex2lyx/test/CMakeLists.txt
@@ -6,31 +6,9 @@
 
 project(test)
 
-set(_test_depend "test.ltx")
-set(_test_output)
-
-foreach(_arg test-structure test-insets test-modules 
box-color-size-space-align CJK XeTeX-polyglossia)
-  list(APPEND _test_depend "${TOP_SRC_DIR}/src/tex2lyx/test/${_arg}.tex")
-  list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.tex")
-  list(APPEND _test_output "${CMAKE_CURRENT_BINARY_DIR}/${_arg}.lyx.lyx")
-endforeach(_arg)
-
-ADD_CUSTOM_COMMAND(
-  OUTPUT ${_test_output}
-  COMMAND ${LYX_PYTHON_EXECUTABLE}
-  ARGS "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py"
-    $<TARGET_FILE:${_tex2lyx}>
-    "${TOP_SRC_DIR}/lib/scripts"
-    "${CMAKE_CURRENT_BINARY_DIR}"
-  WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
-  DEPENDS ${_tex2lyx} ${_test_depend}
-  COMMENT "${LYX_PYTHON_EXECUTABLE}" 
"${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py"
-    "${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${_tex2lyx}"
-    "${TOP_SRC_DIR}/lib/scripts"
-    "${CMAKE_CURRENT_BINARY_DIR}"
-)
-
-#ADD_CUSTOM_TARGET(test DEPENDS ${_tex2lyx} ${_lyx} ${_test_output})
+file(GLOB _tex_tests RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" 
"${CMAKE_CURRENT_SOURCE_DIR}/*.ltx" "${CMAKE_CURRENT_SOURCE_DIR}/*.tex")
+#set(_tex_tests test.ltx test-structure test-insets test-modules 
box-color-size-space-align CJK XeTeX-polyglossia)
+list(REMOVE_ITEM _tex_tests DummyDocument.tex)
 
 add_test(NAME tex2lyx/create_lyx
   COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_lyx})
@@ -39,14 +17,15 @@ add_test(NAME tex2lyx/create_tex2lyx
   COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_tex2lyx})
 set_tests_properties(tex2lyx/create_tex2lyx PROPERTIES DEPENDS 
tex2lyx/create_lyx)
 
-foreach(_fl test.ltx test-structure.tex test-insets.tex test-modules.tex 
box-color-size-space-align.tex CJK.tex XeTeX-polyglossia.tex)
+foreach(_fl ${_tex_tests})
+  set(fl ${_fl})
   add_test(NAME tex2lyx/roundtrip/${_fl}
     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
     COMMAND ${LYX_PYTHON_EXECUTABLE} 
"${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py"
     "${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${_tex2lyx}"
     "${TOP_SRC_DIR}/lib/scripts"
     "${CMAKE_CURRENT_BINARY_DIR}"
-    ${_fl})
+    ${fl})
   set_tests_properties(tex2lyx/roundtrip/${_fl} PROPERTIES DEPENDS 
tex2lyx/create_tex2lyx)
 endforeach()
 

-----------------------------------------------------------------------

Summary of changes:
 src/tex2lyx/test/CMakeLists.txt |   33 ++++++---------------------------
 1 files changed, 6 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to