summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2019-06-04 12:02:41 +0200
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2019-06-04 11:41:02 +0000
commit4d72497e6e7147c103ed1932e7c1b682e19c9a72 (patch)
tree357808422a279822b451b5d060184e87b427462d
parent6d1c695b0e32b644d13a088ab3363b6aef75de68 (diff)
cmake: Fix tests that need helper binaries
Compile the binaries where they are expected not in builddir/bin Change-Id: I5c9461424a4b3f9fb7f39f5b9d3cd9b96887cfbc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--tests/auto/corelib/global/qlogging/CMakeLists.txt9
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt2
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt2
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt2
4 files changed, 13 insertions, 2 deletions
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
index 05b5bdb63b..a83ebab98a 100644
--- a/tests/auto/corelib/global/qlogging/CMakeLists.txt
+++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt
@@ -1,10 +1,15 @@
if(NOT WINRT)
- add_qt_test_helper(qlogging_helper SOURCES app/main.cpp DEFINES QT_MESSAGELOGCONTEXT LIBRARIES Qt::Core)
+ add_qt_executable(qlogging_helper
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES app/main.cpp
+ DEFINES QT_MESSAGELOGCONTEXT
+ LIBRARIES Qt::Core)
endif()
add_qt_test(tst_qlogging SOURCES tst_qlogging.cpp
DEFINES
QT_MESSAGELOGCONTEXT
QT_DISABLE_DEPRECATED_BEFORE=0
- HELPER_BINARY="qlogging_helper"
+ HELPER_BINARY="${CMAKE_CURRENT_BINARY_DIR}/qlogging_helper" # special case
)
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt
index e8d542056c..651388be41 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt
@@ -5,6 +5,8 @@
#####################################################################
add_qt_executable(qmyserver
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
SOURCES
../myobject.h
qmyserver.cpp
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt
index c2bf6ea3e3..59e69c877b 100644
--- a/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt
@@ -5,6 +5,8 @@
#####################################################################
add_qt_executable(qpinger
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
SOURCES
../interface.cpp ../interface.h
qpinger.cpp
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt
index 81427017bd..fdbe587785 100644
--- a/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt
@@ -8,6 +8,8 @@
# already has a executable target named like that, so use
# a different target name and then rename the binary
add_qt_executable(qmyserver_qdbusinterface
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
SOURCES
../myobject.h
qmyserver.cpp