qt_skip_default_testcase_dirs

この変数は Qt 6.9 で導入されました。

注意: この変数はテクノロジープレビューであり、将来のリリースで変更される可能性があります。

Qt Test ターゲットのテストケースディレクトリ定義を無効にします。

QT_SKIP_DEFAULT_TESTCASE_DIRSターゲット・プロパティのデフォルト値を制御します。

メモ: CMake バージョン >= 3.23 でサポートされています。

set(QT_SKIP_DEFAULT_TESTCASE_DIRS TRUE)
...
qt_add_executable(mytest1 main1.cpp)
target_link_libraries(mytest1 PRIVATE Qt6::Test)
...
qt_add_executable(mytest2 main2.cpp)
target_link_libraries(mytest2 PRIVATE Qt6::Test)

mytest1 およびmytest2 をコンパイルするとき、QT_TESTCASE_SOURCEDIR およびQT_TESTCASE_BUILDDIR マクロは未定義のままです。

QFINDTESTDATA およびQT_SKIP_DEFAULT_TESTCASE_DIRSも参照してください

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.