]> git.lyx.org Git - lyx.git/blobdiff - src/tests/CMakeLists.txt
DocBook: fix file inclusion.
[lyx.git] / src / tests / CMakeLists.txt
index 84e934640c0e56f897f75640439f476c6f39bad0..957e4c0cd77edef8c0b046a67d9047eefe42b8b9 100644 (file)
@@ -29,21 +29,27 @@ set_target_properties(check_layout PROPERTIES FOLDER "tests/src")
 
 file(GLOB layout_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" "${TOP_SRC_DIR}/lib/layouts/*.layout")
 file(GLOB module_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" "${TOP_SRC_DIR}/lib/layouts/*.module")
+file(GLOB citeengine_files RELATIVE "${TOP_SRC_DIR}/lib/citeengines" "${TOP_SRC_DIR}/lib/citeengines/*.citeengine")
 list(SORT layout_files)
 list(SORT module_files)
+list(SORT citeengine_files)
 
-foreach(bns ${layout_files} ${module_files})
-  string(REGEX REPLACE "\\.(layout|module)" "" bn ${bns})
+foreach(bns ${layout_files} ${module_files} ${citeengine_files})
+  string(REGEX REPLACE "\\.(layout|module|citeengine)" "" bn ${bns})
   set(_checktype ${CMAKE_MATCH_1})
-  if("${_checktype}" STREQUAL "module")
+  if("${_checktype}" MATCHES "module|citeengine")
     file(WRITE "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "#% Do not delete the line below; configure depends on this\n")
     file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "#  \\DeclareLaTeXClass{test${bn}}\n")
-    file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Format 63\n")
+    file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Format 74\n")
     file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Style Standard\n")
     file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" " LabelType No_Label\n")
     file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" " Category MainText\n")
     file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "End\n")
-    file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Input ${bns}\n")
+    if ("${_checktype}" STREQUAL "citeengine")
+      file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Input \"${TOP_SRC_DIR}/lib/citeengines/${bns}\"\n")
+    else()
+      file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Input ${bns}\n")
+    endif()
     add_test(NAME "check_layout/${bns}"
       COMMAND ${CMAKE_COMMAND}
        "-DCheckLayout=$<TARGET_FILE:check_layout>"
@@ -60,7 +66,7 @@ endforeach()
 
 set(check_ExternalTransforms_SOURCES)
 foreach(_f graphics/GraphicsParams.cpp insets/ExternalTransforms.cpp
-       Length.cpp lengthcommon.cpp tests/check_ExternalTransforms.cpp
+       tests/check_ExternalTransforms.cpp
        tests/boost.cpp tests/dummy_functions.cpp)
     list(APPEND check_ExternalTransforms_SOURCES ${TOP_SRC_DIR}/src/${_f})
 endforeach()
@@ -84,7 +90,7 @@ add_test(NAME "check_ExternalTransforms"
 add_dependencies(lyx_run_tests check_ExternalTransforms)
 
 set(check_Length_SOURCES)
-foreach(_f Length.cpp lengthcommon.cpp tests/check_Length.cpp tests/boost.cpp tests/dummy_functions.cpp)
+foreach(_f tests/check_Length.cpp tests/boost.cpp tests/dummy_functions.cpp)
   list(APPEND check_Length_SOURCES ${TOP_SRC_DIR}/src/${_f})
 endforeach()
 add_executable(check_Length ${check_Length_SOURCES})