Enable Ccache+clang+pch combination.
This commit is contained in:
parent
bd25db3610
commit
67bcc9ee59
|
@ -113,7 +113,7 @@ linux_task:
|
|||
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
||||
env:
|
||||
QT_SELECT: "qt5"
|
||||
ENABLE_CCACHE: false
|
||||
ENABLE_CCACHE: true
|
||||
container:
|
||||
cpu: 2
|
||||
memory: 6G # Set to 6GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
||||
|
@ -121,7 +121,7 @@ linux_task:
|
|||
<< : *LINUX_QT6_TASK_TEMPLATE
|
||||
env:
|
||||
QT_SELECT: "qt6"
|
||||
ENABLE_CCACHE: false
|
||||
ENABLE_CCACHE: true
|
||||
container:
|
||||
cpu: 8
|
||||
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
||||
|
@ -301,7 +301,7 @@ macos_task:
|
|||
ARCH: armv8
|
||||
PLATFORM: "macOS_12.4+"
|
||||
MACOS_DEPLOYMENT_TARGET: 12.0
|
||||
ENABLE_CCACHE: false
|
||||
ENABLE_CCACHE: true
|
||||
matrix:
|
||||
- name: 'macOS Monterey 12 [signle bundle, no tests]'
|
||||
env:
|
||||
|
|
|
@ -739,8 +739,8 @@ for:
|
|||
- qbs setup-qt $(brew --prefix qt6)/bin/qmake qt6
|
||||
- qbs config defaultProfile qt6
|
||||
- qbs config profiles.qt6.baseProfile clang
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||
# from blocking the CI
|
||||
- echo "Create keychain profile"
|
||||
|
@ -922,8 +922,8 @@ for:
|
|||
- qbs setup-qt ${QTDIR}/bin/qmake qt5
|
||||
- qbs config defaultProfile qt5
|
||||
- qbs config profiles.qt5.baseProfile clang
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||
# from blocking the CI
|
||||
- echo "Create keychain profile"
|
||||
|
|
|
@ -42,6 +42,8 @@ Module {
|
|||
|
||||
property bool pchSupport
|
||||
|
||||
readonly property bool clangToolchain: product.qbs.toolchain.contains("gcc") && product.qbs.toolchain.contains("clang")
|
||||
|
||||
configure: {
|
||||
var detector = new Process();
|
||||
try {
|
||||
|
@ -49,13 +51,19 @@ Module {
|
|||
var version = detector.readStdOut().trim(); // we can read only one time
|
||||
|
||||
pchSupport = Utilities.versionCompare(version, "3.1.0") >= 0;
|
||||
if (!pchSupport && Utilities.versionCompare(version, "3.1.0") < 0){
|
||||
if (!pchSupport){
|
||||
console.info("ccache is tool old, version >= 3.1.0 required to work with precompiled headers.");
|
||||
pchSupport = false;
|
||||
}else{
|
||||
if (clangToolchain) {
|
||||
if (Utilities.versionCompare(version, "4.6") < 0) {
|
||||
console.info("ccache version < 4.6 is not compatible with Clang and precompiled headers.");
|
||||
pchSupport = false;
|
||||
}
|
||||
} else {
|
||||
console.info("ccache supports compilation with precompiled headers.");
|
||||
}
|
||||
}
|
||||
|
||||
if (pchSupport)
|
||||
console.info("ccache supports compilation with precompiled headers.")
|
||||
}
|
||||
} finally {
|
||||
detector.close();
|
||||
|
|
Loading…
Reference in New Issue
Block a user