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:
Kornel Benko 2012-10-21 16:58:45 +02:00
parent ed5dfa9cd7
commit f7680c696d
6 changed files with 14 additions and 6 deletions

View File

@ -492,6 +492,12 @@ if(LYX_NLS)
endif()
endif()
if(LYX_EXTERNAL_LIBINTL)
set(intl_link ${LIBINTL_LIBRARIES})
else()
set(intl_link intl)
endif()
find_package(ICONV REQUIRED)
find_package(ZLIB REQUIRED)

View File

@ -126,12 +126,11 @@ target_link_libraries(${_lyx}
frontend_qt4
graphics
support
${LIBINTL_LIBRARIES}
${intl_link}
${ICONV_LIBRARY}
${QT_QTMAIN_LIBRARY}
${vld_dll})
if(HUNSPELL_FOUND)
target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
endif()

View File

@ -29,7 +29,7 @@ add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
target_link_libraries(${_lyxclient}
support
${Lyx_Boost_Libraries}
${LIBINTL_LIBRARIES}
${intl_link}
${ICONV_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY})

View File

@ -13,9 +13,9 @@ macro(sources _program)
endforeach()
set(${_program}_SOURCES ${_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}
${ZLIB_LIBRARY} ${LIBINTL_LIBRARIES} ${ICONV_LIBRARY})
${ZLIB_LIBRARY} ${ICONV_LIBRARY})
endmacro()
file(GLOB test_sources ${TOP_SRC_DIR}/src/support/tests/${LYX_CPP_FILES})

View File

@ -50,7 +50,7 @@ target_link_libraries(${_tex2lyx}
${Lyx_Boost_Libraries}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${LIBINTL_LIBRARIES}
${intl_link}
${ICONV_LIBRARY})
if(WIN32)

View File

@ -34,6 +34,8 @@ ADD_CUSTOM_COMMAND(
add_test(NAME build_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
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
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"
"${CMAKE_CURRENT_BINARY_DIR}")
set_tests_properties(build_tex2lyx PROPERTIES DEPENDS build_lyx)
set_tests_properties(roundtrip_tex2lyx PROPERTIES DEPENDS build_tex2lyx)