From f7b1cf93e67e3eba07597bf7891b854bd8c954ba Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Mon, 17 May 2021 10:54:41 +0200 Subject: ecm_create_qm_loader: support target as alternative argument --- tests/ECMPoQmToolsTest/CMakeLists.txt | 10 +++++++++- tests/ECMPoQmToolsTest/check.cmake.in | 1 + tests/ECMPoQmToolsTest/check_conf.cmake.in | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/ECMPoQmToolsTest') diff --git a/tests/ECMPoQmToolsTest/CMakeLists.txt b/tests/ECMPoQmToolsTest/CMakeLists.txt index 64ec6f1c..e298db9c 100644 --- a/tests/ECMPoQmToolsTest/CMakeLists.txt +++ b/tests/ECMPoQmToolsTest/CMakeLists.txt @@ -71,7 +71,7 @@ ecm_install_po_files_as_qm(tr_test-po) # -# single-threaded test +# single-threaded test, sources var arg # set(tr_test_SRCS tr_test.cpp @@ -81,6 +81,14 @@ add_executable(tr_test ${tr_test_SRCS}) target_link_libraries(tr_test PRIVATE Qt5::Core) +# +# single-threaded test, target arg +# +add_executable(tr_test_target tr_test.cpp) +ecm_create_qm_loader(tr_test_target catalog) +target_link_libraries(tr_test_target PRIVATE Qt5::Core) + + # # single-threaded test (different catalog name, automoc) # diff --git a/tests/ECMPoQmToolsTest/check.cmake.in b/tests/ECMPoQmToolsTest/check.cmake.in index 26320584..5d3d8258 100644 --- a/tests/ECMPoQmToolsTest/check.cmake.in +++ b/tests/ECMPoQmToolsTest/check.cmake.in @@ -88,6 +88,7 @@ if("@CMAKE_SYSTEM_NAME@" STREQUAL "Linux") endfunction() check_translations(TR_TEST "${TR_TEST_EXEC}" catalog) + check_translations(TR_TEST_TARGET "${TR_TEST_TARGET_EXEC}" catalog) check_translations(TR_TEST_2 "${TR_TEST_2_EXEC}" catalog2) check_translations(TR_TEST_SUBDIR "${TR_TEST_SUBDIR_EXEC}" catalog) diff --git a/tests/ECMPoQmToolsTest/check_conf.cmake.in b/tests/ECMPoQmToolsTest/check_conf.cmake.in index a752d5bd..5b07a00f 100644 --- a/tests/ECMPoQmToolsTest/check_conf.cmake.in +++ b/tests/ECMPoQmToolsTest/check_conf.cmake.in @@ -1,4 +1,5 @@ set(TR_TEST_EXEC "$") +set(TR_TEST_TARGET_EXEC "$") set(TR_TEST_2_EXEC "$") set(TR_TEST_SUBDIR_EXEC "$") set(TR_THREAD_TEST_EXEC "$") -- cgit v1.2.1