diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-06-23 11:00:52 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-06-23 11:45:37 +0000 |
commit | e54b53cdaa1db79558e2e4b676cfc697c0375298 (patch) | |
tree | f26a87a69bb349144a0a3db4fe5cd37c55bc3564 | |
parent | eeb1a8fe58cef1995b7293e39baf8a6c30e08b24 (diff) |
qbs build: Use precompiled headers.
It was an oversight that we haven't done this before.
Change-Id: Ic338503f6c1ca5e6c52c9af3bdbdb92b7776cac1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
-rw-r--r-- | qbs/imports/QtcLibrary.qbs | 1 | ||||
-rw-r--r-- | qbs/imports/QtcPlugin.qbs | 1 | ||||
-rw-r--r-- | qbs/imports/QtcProduct.qbs | 22 | ||||
-rw-r--r-- | qbs/imports/QtcTool.qbs | 1 | ||||
-rw-r--r-- | qbs/imports/src | 0 | ||||
-rw-r--r-- | qbs/modules/qtc/qtc.qbs | 1 | ||||
-rw-r--r-- | src/shared/pch_files.qbs | 16 | ||||
-rw-r--r-- | src/src.qbs | 1 |
8 files changed, 43 insertions, 0 deletions
diff --git a/qbs/imports/QtcLibrary.qbs b/qbs/imports/QtcLibrary.qbs index 684a18cb12f..e4dd782b116 100644 --- a/qbs/imports/QtcLibrary.qbs +++ b/qbs/imports/QtcLibrary.qbs @@ -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" diff --git a/qbs/imports/QtcPlugin.qbs b/qbs/imports/QtcPlugin.qbs index 88ec4dff16a..ed6d2b6760e 100644 --- a/qbs/imports/QtcPlugin.qbs +++ b/qbs/imports/QtcPlugin.qbs @@ -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: [] diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index 3c789ed3de5..fee3782c8c6 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -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"] + } } diff --git a/qbs/imports/QtcTool.qbs b/qbs/imports/QtcTool.qbs index 7d75ba5ae77..e8dd54efaa1 100644 --- a/qbs/imports/QtcTool.qbs +++ b/qbs/imports/QtcTool.qbs @@ -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, diff --git a/qbs/imports/src b/qbs/imports/src new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/qbs/imports/src diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 2b17ae13798..5f7e7de1b3f 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -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 diff --git a/src/shared/pch_files.qbs b/src/shared/pch_files.qbs new file mode 100644 index 00000000000..237f8456db8 --- /dev/null +++ b/src/shared/pch_files.qbs @@ -0,0 +1,16 @@ +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 + } +} diff --git a/src/src.qbs b/src/src.qbs index 885bb6dd1a0..adc7055d216 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -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") |