Skip to content

Commit

Permalink
Place test helpers in batched test output directory unless overridden
Browse files Browse the repository at this point in the history
Change-Id: Ica209d10773d1acc38c3bad934cb53856e6a6c2a
Reviewed-by: Alexandru Croitor <[email protected]>
  • Loading branch information
mboc-qt committed Aug 25, 2022
1 parent cf2dc8d commit b9053b5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/QtTestHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,14 @@ function(qt_internal_add_test_helper name)

set(extra_args_to_pass)
if(NOT arg_OVERRIDE_OUTPUT_DIRECTORY)
set(extra_args_to_pass OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/..")
if(QT_BUILD_TESTS_BATCHED)
_qt_internal_test_batch_target_name(test_batch_target_name)
get_target_property(
test_batch_output_dir ${test_batch_target_name} RUNTIME_OUTPUT_DIRECTORY)
set(extra_args_to_pass OUTPUT_DIRECTORY "${test_batch_output_dir}")
else()
set(extra_args_to_pass OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/..")
endif()
endif()

qt_internal_add_executable("${name}" NO_INSTALL ${extra_args_to_pass} ${forward_args})
Expand Down

0 comments on commit b9053b5

Please sign in to comment.