forked from qt-creator/qt-creator
Since version 3 of Catch2 it is recommended to use the approach to link against Catch2 instead of using a single include. Make both variants work. There is still a third variant of using a single include for version 3, which is left out here, but can easily be fixed for Catch2 users. Change-Id: I2c25837cb1df4b460b662466dde68563fa7d713c Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
17 lines
446 B
JavaScript
17 lines
446 B
JavaScript
// Copyright (C) 2023 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
var File = require("qbs.File")
|
|
var FileInfo = require("qbs.FileInfo")
|
|
|
|
function getChildPath(qbs, baseFolder, childFolder)
|
|
{
|
|
if (!baseFolder)
|
|
return [];
|
|
|
|
var childPath = FileInfo.joinPaths(baseFolder, childFolder);
|
|
if (File.exists(childPath))
|
|
return [childPath];
|
|
return [];
|
|
}
|