summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-03-09 15:38:58 +0100
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-03-14 17:28:43 +0100
commite51273427814b05affa4dd642d2ec77be83969c1 (patch)
tree4d8d67f33be9f20f86f878b783f9d399a1b57183 /tests
parent3e1108aa7fbc69244254e128b97eac528e35d03d (diff)
Use qt_internal_add_executable in auto tests
When possible, I replaced add_executable with qt_internal_add_executable. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I643d2e27f0d880fe9b6cec7af790e4c99227fb0c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt6
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt6
18 files changed, 99 insertions, 20 deletions
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt
index 80fae82a39..b7f090c951 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt
@@ -5,4 +5,8 @@
## testExitCodes Binary:
#####################################################################
-add_executable(testExitCodes main.cpp)
+qt_internal_add_executable(testExitCodes
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt
index b5d9096a21..29190d3bec 100644
--- a/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt
@@ -5,4 +5,8 @@
## testForwardingHelper Binary:
#####################################################################
-add_executable(testForwardingHelper main.cpp)
+qt_internal_add_executable(testForwardingHelper
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt
index 0aeaa68e0d..a38f9da46c 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessCrash Binary:
#####################################################################
-add_executable(testProcessCrash main.cpp)
+qt_internal_add_executable(testProcessCrash
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt
index 9d1d1372b4..fa85e23f4c 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessDeadWhileReading Binary:
#####################################################################
-add_executable(testProcessDeadWhileReading main.cpp)
+qt_internal_add_executable(testProcessDeadWhileReading
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt
index c7c7558c04..7cfae21109 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessEOF Binary:
#####################################################################
-add_executable(testProcessEOF main.cpp)
+qt_internal_add_executable(testProcessEOF
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt
index 30c42b8797..f11d43b13c 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessEcho Binary:
#####################################################################
-add_executable(testProcessEcho main.cpp)
+qt_internal_add_executable(testProcessEcho
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt
index d349b6af57..6483d68705 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessEcho2 Binary:
#####################################################################
-add_executable(testProcessEcho2 main.cpp)
+qt_internal_add_executable(testProcessEcho2
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt
index 67cdd8d315..b47e3f0eed 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessEcho3 Binary:
#####################################################################
-add_executable(testProcessEcho3 main.cpp)
+qt_internal_add_executable(testProcessEcho3
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt
index 6254d4f61b..f63403d845 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt
@@ -5,5 +5,10 @@
## testProcessEchoGui Binary:
#####################################################################
-add_executable(testProcessEchoGui WIN32 main_win.cpp)
+qt_internal_add_executable(testProcessEchoGui
+ GUI
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main_win.cpp
+)
target_link_libraries(testProcessEchoGui PRIVATE user32)
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt
index 6f0cdd5ffb..c06b8d4892 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessEnvironment Binary:
#####################################################################
-add_executable(testProcessEnvironment main.cpp)
+qt_internal_add_executable(testProcessEnvironment
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt
index ba8a92ab30..256253e707 100644
--- a/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessHang Binary:
#####################################################################
-add_executable(testProcessHang main.cpp)
+qt_internal_add_executable(testProcessHang
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt
index f71dfde8e0..06ce2ecc07 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessNormal Binary:
#####################################################################
-add_executable(testProcessNormal main.cpp)
+qt_internal_add_executable(testProcessNormal
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt
index b74a870f4e..8f2697f77a 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt
@@ -5,4 +5,8 @@
## testProcessOutput Binary:
#####################################################################
-add_executable(testProcessOutput main.cpp)
+qt_internal_add_executable(testProcessOutput
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt
index a0ce882db1..8102dd35fb 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt
@@ -1,10 +1,22 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-add_executable(nospace main.cpp)
+qt_internal_add_executable(nospace
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
-add_executable(onespace main.cpp)
+qt_internal_add_executable(onespace
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
set_target_properties(onespace PROPERTIES OUTPUT_NAME "one space")
-add_executable(twospaces main.cpp)
+qt_internal_add_executable(twospaces
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
set_target_properties(twospaces PROPERTIES OUTPUT_NAME "two space s")
diff --git a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt
index 9e4f0f2e56..8a168155a4 100644
--- a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt
@@ -5,5 +5,9 @@
## testSetNamedPipeHandleState Binary:
#####################################################################
-add_executable(testSetNamedPipeHandleState main.cpp)
+qt_internal_add_executable(testSetNamedPipeHandleState
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
target_link_libraries(testSetNamedPipeHandleState PRIVATE kernel32.lib)
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt
index c9fa43d073..8c42bfc972 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt
@@ -5,7 +5,9 @@
## testSoftExit Binary:
#####################################################################
-add_executable(testSoftExit)
+qt_internal_add_executable(testSoftExit
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+)
qt_internal_extend_target(testSoftExit CONDITION WIN32
SOURCES
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt
index 4223030f46..0658a72a04 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt
@@ -5,6 +5,10 @@
## testSpaceInName Binary:
#####################################################################
-add_executable(testSpaceInName main.cpp)
+qt_internal_add_executable(testSpaceInName
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
set_property(TARGET testSpaceInName PROPERTY
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../test Space In Name")
diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
index 87cfa4dd17..2bc1ebb7b0 100644
--- a/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
+++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
@@ -5,4 +5,8 @@
## write-read-write Binary:
#####################################################################
-add_executable(write-read-write main.cpp)
+qt_internal_add_executable(write-read-write
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)