From fc14f1a46747bdabb7bac88c17d86a2c052029f3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 8 Oct 2022 08:50:51 -0700 Subject: [PATCH] IPC: move the feature check to the ipc/ dir for tst_qsharedmemory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id8d5e3999fe94b03acc1fffd171c22d2e8752ffb Reviewed-by: Tor Arne Vestbø Reviewed-by: Mårten Nordheim --- tests/auto/corelib/ipc/CMakeLists.txt | 2 +- .../corelib/ipc/qsharedmemory/CMakeLists.txt | 36 ++++++++----------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/tests/auto/corelib/ipc/CMakeLists.txt b/tests/auto/corelib/ipc/CMakeLists.txt index e6e50e77e6..5b9ffae7d9 100644 --- a/tests/auto/corelib/ipc/CMakeLists.txt +++ b/tests/auto/corelib/ipc/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: BSD-3-Clause if(NOT ANDROID AND NOT UIKIT) - if(QT_FEATURE_private_tests) + if(QT_FEATURE_sharedmemory AND QT_FEATURE_private_tests) add_subdirectory(qsharedmemory) endif() if(QT_FEATURE_systemsemaphore) diff --git a/tests/auto/corelib/ipc/qsharedmemory/CMakeLists.txt b/tests/auto/corelib/ipc/qsharedmemory/CMakeLists.txt index cd1c3294ea..da87d1c7be 100644 --- a/tests/auto/corelib/ipc/qsharedmemory/CMakeLists.txt +++ b/tests/auto/corelib/ipc/qsharedmemory/CMakeLists.txt @@ -1,27 +1,21 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -if(QT_FEATURE_sharedmemory) - ##################################################################### - ## tst_qsharedmemory Test: - ##################################################################### +qt_internal_add_test(tst_qsharedmemory + SOURCES + tst_qsharedmemory.cpp + LIBRARIES + Qt::CorePrivate +) - qt_internal_add_test(tst_qsharedmemory - SOURCES - tst_qsharedmemory.cpp - LIBRARIES - Qt::CorePrivate - ) +## Scopes: +##################################################################### - ## Scopes: - ##################################################################### - - qt_internal_extend_target(tst_qsharedmemory CONDITION LINUX - LIBRARIES - rt - ) - add_subdirectory(producerconsumer) - if(QT_FEATURE_process) - add_dependencies(tst_qsharedmemory producerconsumer_helper) - endif() +qt_internal_extend_target(tst_qsharedmemory CONDITION LINUX + LIBRARIES + rt +) +add_subdirectory(producerconsumer) +if(QT_FEATURE_process) + add_dependencies(tst_qsharedmemory producerconsumer_helper) endif()