mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Add custom target to run tests
This target can depend on the individual test projects and this makes sure that the test projects are build before running the tests.
This commit is contained in:
parent
bec9c1325e
commit
1b3871b302
@ -700,6 +700,17 @@ endif()
|
||||
|
||||
set(_lyx "${PACKAGE_BASE}${PROGRAM_SUFFIX}")
|
||||
set(_tex2lyx tex2lyx${PROGRAM_SUFFIX})
|
||||
|
||||
set (cmd ${CMAKE_CTEST_COMMAND})
|
||||
if (MSVC)
|
||||
set (cmd ${cmd} -C ${CMAKE_CFG_INTDIR})
|
||||
else ()
|
||||
set (cmd ${cmd} -C ${CMAKE_BUILD_TYPE})
|
||||
endif ()
|
||||
add_custom_target (lyx_run_tests COMMAND ${cmd})
|
||||
set_target_properties(lyx_run_tests PROPERTIES FOLDER "tests")
|
||||
|
||||
|
||||
add_subdirectory(src "${TOP_BINARY_DIR}/src")
|
||||
add_subdirectory(lib/lyx2lyx "${TOP_BINARY_DIR}/lyx2lyx")
|
||||
add_subdirectory(lib/scripts "${TOP_BINARY_DIR}/scripts")
|
||||
|
@ -30,3 +30,4 @@ else()
|
||||
endif()
|
||||
|
||||
target_link_libraries(xvkbd ${XVFBDLIBS})
|
||||
add_dependencies(lyx_run_tests xvkbd)
|
||||
|
@ -45,6 +45,7 @@ foreach(_src ${check_PROGRAMS})
|
||||
-P "${TOP_SRC_DIR}/src/support/tests/supporttest.cmake")
|
||||
|
||||
set_target_properties(${_src} PROPERTIES FOLDER "tests/support")
|
||||
add_dependencies(lyx_run_tests ${_src})
|
||||
endforeach()
|
||||
|
||||
|
||||
|
@ -25,4 +25,5 @@ foreach(_fl ${_tex_tests})
|
||||
${fl})
|
||||
endforeach()
|
||||
|
||||
add_dependencies(lyx_run_tests ${_tex2lyx} ${_lyx})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user