Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cmake-variables.qdoc
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\group cmake-variables-qttest
6\title CMake Variables in Qt6 Test
7\brief Lists CMake variables defined in Qt6::Test.
8
9The following CMake variables are defined when Qt6::Test is loaded, for instance
10with
11
12\badcode
13find_package(Qt6 REQUIRED COMPONENTS Test)
14\endcode
15
16\sa{CMake Variable Reference}
17*/
18
19/*!
20\page cmake-variable-qt-skip-default-testcase-dirs.html
21\ingroup cmake-variables-qttest
22
23\title QT_SKIP_DEFAULT_TESTCASE_DIRS
24\target cmake-variable-QT_SKIP_DEFAULT_TESTCASE_DIRS
25
26\cmakevariablesince 6.9
27\preliminarycmakevariable
28
29\summary {Disables the test case directory definitions for the Qt Test targets.}
30
31Controls the default value of the
32\l {cmake-target-property-QT_SKIP_DEFAULT_TESTCASE_DIRS}{QT_SKIP_DEFAULT_TESTCASE_DIRS}
33target property.
34\note Supported by CMake versions >= 3.23.
35
36\badcode
37set(QT_SKIP_DEFAULT_TESTCASE_DIRS TRUE)
38...
39qt_add_executable(mytest1 main1.cpp)
40target_link_libraries(mytest1 PRIVATE Qt6::Test)
41...
42qt_add_executable(mytest2 main2.cpp)
43target_link_libraries(mytest2 PRIVATE Qt6::Test)
44\endcode
45
46The \c QT_TESTCASE_SOURCEDIR and \c QT_TESTCASE_BUILDDIR macros will remain
47undefined when compiling \c mytest1 and \c mytest2.
48
49\sa QFINDTESTDATA,
50 {cmake-target-property-QT_SKIP_DEFAULT_TESTCASE_DIRS}{QT_SKIP_DEFAULT_TESTCASE_DIRS}
51*/