CMake: Fix CMP0174 warnings in Qt6CTestMacros.cmake

Invalid build dir values were passed to the WORKING_DIRECTORY option
to the qt test apis.

We shouldn't be passing the option at all, it makes no difference for
the case of calling ctest --build-and-test, because we already specify
the build dir in the command line of ctest.

Amends bc5b7e218f7259f440449e69c42518467bc5907b

Pick-to: 6.8
Change-Id: I0fe5b20a4beaefbd129849699c873c6a558d8996
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2024-11-19 15:39:47 +01:00
parent 19bce49aaa
commit e54d4eabbe

View File

@ -466,7 +466,6 @@ macro(_qt_internal_test_expect_pass _dir)
COMMAND ${CMAKE_CTEST_COMMAND} ${ctest_command_args}
COMMAND_ECHO STDOUT
OUTPUT_FILE "${wrapper_file}"
WORKING_DIRECTORY "${build_dir}"
PRE_RUN ${_qt_internal_skip_build_test_pre_run}
)
@ -695,7 +694,6 @@ list(APPEND CMAKE_PREFIX_PATH \"${__expect_fail_prefixes}\")
--build-options ${option_list}
COMMAND_ECHO STDOUT
OUTPUT_FILE "${wrapper_file}"
WORKING_DIRECTORY "${build_dir}"
PRE_RUN ${_qt_internal_skip_build_test_pre_run}
)
@ -819,7 +817,6 @@ function(_qt_internal_test_module_includes)
--build-options ${option_list}
COMMAND_ECHO STDOUT
OUTPUT_FILE "${wrapper_file}"
WORKING_DIRECTORY "${build_dir}"
PRE_RUN ${_qt_internal_skip_build_test_pre_run}
)