diff options
Diffstat (limited to 'tests/libfuzzer/corelib/text/qregularexpression/optimize')
3 files changed, 24 insertions, 54 deletions
diff --git a/tests/libfuzzer/corelib/text/qregularexpression/optimize/CMakeLists.txt b/tests/libfuzzer/corelib/text/qregularexpression/optimize/CMakeLists.txt index a82e5fa340..fcacd7c67d 100644 --- a/tests/libfuzzer/corelib/text/qregularexpression/optimize/CMakeLists.txt +++ b/tests/libfuzzer/corelib/text/qregularexpression/optimize/CMakeLists.txt @@ -1,27 +1,30 @@ -# Generated from optimize.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause -##################################################################### -## optimize Binary: -##################################################################### +cmake_minimum_required(VERSION 3.16) +project(optimize LANGUAGES CXX) -qt_add_executable(optimize - GUI - SOURCES - main.cpp -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -#### Keys ignored in scope 1:.:.:optimize.pro:<TRUE>: -# FUZZ_ENGINE = "$$(LIB_FUZZING_ENGINE)" +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) -## Scopes: -##################################################################### +find_package(Qt6 REQUIRED COMPONENTS Core) -qt_extend_target(optimize CONDITION FUZZ_ENGINE_ISEMPTY - LINK_OPTIONS - "-fsanitize=fuzzer" +qt_add_executable(optimize + main.cpp ) -qt_extend_target(optimize CONDITION NOT FUZZ_ENGINE_ISEMPTY - PUBLIC_LIBRARIES - $ENV{LIB_FUZZING_ENGINE} +target_link_libraries(optimize PUBLIC + Qt::Core ) +if(DEFINED ENV{LIB_FUZZING_ENGINE}) + target_link_libraries(optimize PRIVATE + $ENV{LIB_FUZZING_ENGINE} + ) +else() + target_link_libraries(optimize PRIVATE + -fsanitize=fuzzer + ) +endif() diff --git a/tests/libfuzzer/corelib/text/qregularexpression/optimize/main.cpp b/tests/libfuzzer/corelib/text/qregularexpression/optimize/main.cpp index 30a714c250..335b6c0552 100644 --- a/tests/libfuzzer/corelib/text/qregularexpression/optimize/main.cpp +++ b/tests/libfuzzer/corelib/text/qregularexpression/optimize/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QRegularExpression> diff --git a/tests/libfuzzer/corelib/text/qregularexpression/optimize/optimize.pro b/tests/libfuzzer/corelib/text/qregularexpression/optimize/optimize.pro deleted file mode 100644 index 196aca42eb..0000000000 --- a/tests/libfuzzer/corelib/text/qregularexpression/optimize/optimize.pro +++ /dev/null @@ -1,8 +0,0 @@ -QT -= gui -SOURCES += main.cpp -FUZZ_ENGINE = $$(LIB_FUZZING_ENGINE) -isEmpty(FUZZ_ENGINE) { - QMAKE_LFLAGS += -fsanitize=fuzzer -} else { - LIBS += $$FUZZ_ENGINE -} |