2013-05-14 09:17:50 +00:00
|
|
|
# This file is part of LyX, the document processor.
|
|
|
|
# Licence details can be found in the file COPYING.
|
|
|
|
#
|
|
|
|
# Copyright (c) 2013 Kornel Benko kornel@lyx.org
|
|
|
|
#
|
|
|
|
|
2013-05-14 16:41:33 +00:00
|
|
|
set(check_layout_SOURCES)
|
2013-05-14 09:17:50 +00:00
|
|
|
foreach(_f insets/InsetLayout.cpp Color.cpp Counters.cpp Floating.cpp
|
|
|
|
FloatList.cpp FontInfo.cpp Layout.cpp LayoutFile.cpp Lexer.cpp
|
2013-05-14 16:41:33 +00:00
|
|
|
ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_layout.cpp
|
2014-04-20 18:20:25 +00:00
|
|
|
tests/boost.cpp tests/dummy_functions.cpp)
|
2013-05-14 16:41:33 +00:00
|
|
|
list(APPEND check_layout_SOURCES "${TOP_SRC_DIR}/src/${_f}")
|
2013-05-14 09:17:50 +00:00
|
|
|
endforeach()
|
|
|
|
|
2014-04-21 17:14:25 +00:00
|
|
|
include_directories(${TOP_SRC_DIR}/src/support/tests)
|
|
|
|
|
2013-05-14 16:41:33 +00:00
|
|
|
add_executable(check_layout ${check_layout_SOURCES})
|
2013-05-14 13:34:15 +00:00
|
|
|
|
2013-05-12 13:43:22 +00:00
|
|
|
target_link_libraries(check_layout support
|
2013-05-15 09:28:04 +00:00
|
|
|
${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
|
2014-06-12 17:02:29 +00:00
|
|
|
${ZLIB_LIBRARY} ${ICONV_LIBRARY})
|
|
|
|
lyx_target_link_libraries(check_layout Magic)
|
2013-05-12 13:43:22 +00:00
|
|
|
|
2013-05-14 16:41:33 +00:00
|
|
|
add_dependencies(lyx_run_tests check_layout)
|
|
|
|
set_target_properties(check_layout PROPERTIES FOLDER "tests/src")
|
2013-05-14 09:17:50 +00:00
|
|
|
|
|
|
|
file(GLOB layout_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" "${TOP_SRC_DIR}/lib/layouts/*.layout")
|
|
|
|
list(SORT layout_files)
|
|
|
|
foreach(bns ${layout_files})
|
|
|
|
string(REPLACE ".layout" "" bn ${bns})
|
|
|
|
|
2013-05-14 16:41:33 +00:00
|
|
|
add_test(NAME "check_layout/${bns}"
|
|
|
|
COMMAND check_layout "${TOP_SRC_DIR}/lib/layouts/${bn}")
|
2013-09-07 07:27:40 +00:00
|
|
|
settestlabel("check_layout/${bns}" "layout")
|
2013-05-14 09:17:50 +00:00
|
|
|
endforeach()
|