diff options
author | Cristian Adam <cristian.adam@qt.io> | 2019-09-18 14:10:52 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-09-19 09:55:30 +0000 |
commit | f275a1fa28230568d23ddf071eaf6638a59b662f (patch) | |
tree | 39024bb9ce0fbd21a5fb28eebec7c45918899f46 | |
parent | a33cb335f7e513e2f3b610b3290ccb87d029fa8c (diff) | |
download | qt-creator-f275a1fa28230568d23ddf071eaf6638a59b662f.tar.gz |
CMake Build: Fix CMake configuration when BUILD_WITH_TESTS=ON
The GMock/GTest unittest was not working with the latest translation
patches.
Change-Id: I83e337c6278cb93344c734c05d090a65def34a3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r-- | cmake/QtCreatorAPI.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index db98b9751c..5e3ea2534c 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -201,7 +201,10 @@ function(set_public_includes target includes) endforeach() endfunction() -function(fix_test_environment test_name) +function(finalize_test_setup test_name) + # Never translate tests: + set_tests_properties(${name} PROPERTIES QT_SKIP_TRANSLATION ON) + if (WIN32) list(APPEND env_path $ENV{PATH}) list(APPEND env_path ${CMAKE_BINARY_DIR}/${IDE_PLUGIN_PATH}) @@ -828,11 +831,8 @@ function(add_qtc_test name) if (NOT _arg_GTEST) add_test(NAME ${name} COMMAND ${name}) - fix_test_environment(${name}) + finalize_test_setup(${name}) endif() - - # Never translate tests: - set_tests_properties(${name} PROPERTIES QT_SKIP_TRANSLATION ON) endfunction() function(finalize_qtc_gtest test_name) @@ -841,6 +841,6 @@ function(finalize_qtc_gtest test_name) gtest_add_tests(TARGET ${test_name} SOURCES ${test_sources} TEST_LIST test_list) foreach(test IN LISTS test_list) - fix_test_environment(${test}) + finalize_test_setup(${test}) endforeach() endfunction() |