Commit e54b53cd authored by Christian Kandeler's avatar Christian Kandeler

qbs build: Use precompiled headers.

It was an oversight that we haven't done this before.

Change-Id: Ic338503f6c1ca5e6c52c9af3bdbdb92b7776cac1
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent eeb1a8fe
......@@ -5,6 +5,7 @@ QtcProduct {
type: ["dynamiclibrary", "dynamiclibrary_symlink", "qtc.dev-module"]
installDir: qtc.ide_library_path
installTags: ["dynamiclibrary", "dynamiclibrary_symlink"]
useNonGuiPchFile: true
Depends {
condition: qtc.testsEnabled
name: "Qt.test"
......
......@@ -6,6 +6,7 @@ QtcProduct {
type: ["dynamiclibrary", "pluginSpec", "qtc.dev-module"]
installDir: qtc.ide_plugin_path
installTags: ["dynamiclibrary"]
useGuiPchFile: true
property var pluginJsonReplacements
property var pluginRecommends: []
......
......@@ -9,6 +9,11 @@ Product {
property string installDir
property stringList installTags: type
property string fileName: FileInfo.fileName(sourceDirectory) + ".qbs"
property bool useNonGuiPchFile: false
property bool useGuiPchFile: false
property string pathToSharedSources: FileInfo.joinPaths(path,
FileInfo.relativePath(FileInfo.joinPaths('/', qtc.ide_qbs_imports_path),
FileInfo.joinPaths('/', qtc.ide_shared_sources_path)))
Depends { name: "cpp" }
Depends { name: "qtc" }
......@@ -24,6 +29,7 @@ Product {
}
cpp.minimumOsxVersion: "10.7"
cpp.minimumWindowsVersion: qbs.architecture === "x86" ? "5.1" : "5.2"
cpp.useCxxPrecompiledHeader: useNonGuiPchFile || useGuiPchFile
cpp.visibility: "minimal"
Depends { name: "Qt.core" }
......@@ -39,4 +45,20 @@ Product {
qbs.install: true
qbs.installDir: qtc.ide_qbs_modules_path + '/' + product.name
}
Group {
name: "standard pch file (non-gui)"
condition: useNonGuiPchFile
prefix: pathToSharedSources + '/'
files: ["qtcreator_pch.h"]
fileTags: ["cpp_pch_src"]
}
Group {
name: "standard pch file (gui)"
condition: useGuiPchFile
prefix: pathToSharedSources + '/'
files: ["qtcreator_gui_pch.h"]
fileTags: ["cpp_pch_src"]
}
}
......@@ -5,6 +5,7 @@ QtcProduct {
type: ["application"]
consoleApplication: true
installDir: qtc.ide_libexec_path
useNonGuiPchFile: true
cpp.rpaths: {
var relativePathToLibs = FileInfo.relativePath('/' + qtc.ide_libexec_path,
......
......@@ -51,6 +51,7 @@ Module {
property string ide_qbs_resources_path: "qbs-resources"
property string ide_qbs_modules_path: ide_qbs_resources_path + "/modules"
property string ide_qbs_imports_path: ide_qbs_resources_path + "/imports"
property string ide_shared_sources_path: "src/shared"
property bool make_dev_package: false
......
import qbs
import qbs.FileInfo
Product {
name: "precompiled headers"
condition: qtc.make_dev_package
Depends { name: "qtc" }
Group {
files: [
"qtcreator_pch.h",
"qtcreator_gui_pch.h",
]
qbs.install: true
qbs.installDir: qtc.ide_shared_sources_path
}
}
......@@ -13,6 +13,7 @@ Project {
"tools/tools.qbs",
project.sharedSourcesDir + "/json",
project.sharedSourcesDir + "/proparser",
project.sharedSourcesDir + "/pch_files.qbs",
]
property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment