mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Cmake build:
Added dependencies to target `test'. Now all the needed executables are recreated prior to running tests if not already existant.
This commit is contained in:
parent
ed5dfa9cd7
commit
f7680c696d
@ -492,6 +492,12 @@ if(LYX_NLS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(LYX_EXTERNAL_LIBINTL)
|
||||||
|
set(intl_link ${LIBINTL_LIBRARIES})
|
||||||
|
else()
|
||||||
|
set(intl_link intl)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(ICONV REQUIRED)
|
find_package(ICONV REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
|
@ -126,12 +126,11 @@ target_link_libraries(${_lyx}
|
|||||||
frontend_qt4
|
frontend_qt4
|
||||||
graphics
|
graphics
|
||||||
support
|
support
|
||||||
${LIBINTL_LIBRARIES}
|
${intl_link}
|
||||||
${ICONV_LIBRARY}
|
${ICONV_LIBRARY}
|
||||||
${QT_QTMAIN_LIBRARY}
|
${QT_QTMAIN_LIBRARY}
|
||||||
${vld_dll})
|
${vld_dll})
|
||||||
|
|
||||||
|
|
||||||
if(HUNSPELL_FOUND)
|
if(HUNSPELL_FOUND)
|
||||||
target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
|
target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
@ -29,7 +29,7 @@ add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
|
|||||||
target_link_libraries(${_lyxclient}
|
target_link_libraries(${_lyxclient}
|
||||||
support
|
support
|
||||||
${Lyx_Boost_Libraries}
|
${Lyx_Boost_Libraries}
|
||||||
${LIBINTL_LIBRARIES}
|
${intl_link}
|
||||||
${ICONV_LIBRARY}
|
${ICONV_LIBRARY}
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY})
|
${QT_QTGUI_LIBRARY})
|
||||||
|
@ -13,9 +13,9 @@ macro(sources _program)
|
|||||||
endforeach()
|
endforeach()
|
||||||
set(${_program}_SOURCES ${_tmplist})
|
set(${_program}_SOURCES ${_tmplist})
|
||||||
add_executable(${_program} ${_tmplist})
|
add_executable(${_program} ${_tmplist})
|
||||||
target_link_libraries(${_program} support
|
target_link_libraries(${_program} support ${intl_link}
|
||||||
${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
|
${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
|
||||||
${ZLIB_LIBRARY} ${LIBINTL_LIBRARIES} ${ICONV_LIBRARY})
|
${ZLIB_LIBRARY} ${ICONV_LIBRARY})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
file(GLOB test_sources ${TOP_SRC_DIR}/src/support/tests/${LYX_CPP_FILES})
|
file(GLOB test_sources ${TOP_SRC_DIR}/src/support/tests/${LYX_CPP_FILES})
|
||||||
|
@ -50,7 +50,7 @@ target_link_libraries(${_tex2lyx}
|
|||||||
${Lyx_Boost_Libraries}
|
${Lyx_Boost_Libraries}
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${LIBINTL_LIBRARIES}
|
${intl_link}
|
||||||
${ICONV_LIBRARY})
|
${ICONV_LIBRARY})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@ -34,6 +34,8 @@ ADD_CUSTOM_COMMAND(
|
|||||||
|
|
||||||
add_test(NAME build_tex2lyx
|
add_test(NAME build_tex2lyx
|
||||||
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_tex2lyx})
|
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_tex2lyx})
|
||||||
|
add_test(NAME build_lyx
|
||||||
|
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_lyx})
|
||||||
add_test(NAME roundtrip_tex2lyx
|
add_test(NAME roundtrip_tex2lyx
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
COMMAND ${LYX_PYTHON_EXECUTABLE} "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py"
|
COMMAND ${LYX_PYTHON_EXECUTABLE} "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py"
|
||||||
@ -41,5 +43,6 @@ add_test(NAME roundtrip_tex2lyx
|
|||||||
"${TOP_SRC_DIR}/lib/scripts"
|
"${TOP_SRC_DIR}/lib/scripts"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}")
|
"${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
set_tests_properties(build_tex2lyx PROPERTIES DEPENDS build_lyx)
|
||||||
set_tests_properties(roundtrip_tex2lyx PROPERTIES DEPENDS build_tex2lyx)
|
set_tests_properties(roundtrip_tex2lyx PROPERTIES DEPENDS build_tex2lyx)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user