summaryrefslogtreecommitdiff
path: root/src/plugins/clangpchmanager
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-08-10 10:10:04 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-08-10 09:57:38 +0000
commit8cfd5b165a77279961d5c744f560e9f050c86390 (patch)
treee8d41174d8b1b96db5481192cc08f096bea9c6d8 /src/plugins/clangpchmanager
parentc1a0d897327af3e63ab00e7b0f5a9101991ed713 (diff)
downloadqt-creator-8cfd5b165a77279961d5c744f560e9f050c86390.tar.gz
Fix qbs build when no llvm is present
Some defines were set conditionally, but accessed unconditionally, which of course breaks the build. Make sure the defines are always set. Also gather them in a module, instead of copying the code all over the place. Change-Id: Iac628da64fb3934872d912510936aeccd0e20247 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/clangpchmanager')
-rw-r--r--src/plugins/clangpchmanager/clangpchmanager.qbs15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/plugins/clangpchmanager/clangpchmanager.qbs b/src/plugins/clangpchmanager/clangpchmanager.qbs
index 8e7c5447a6..8c22188633 100644
--- a/src/plugins/clangpchmanager/clangpchmanager.qbs
+++ b/src/plugins/clangpchmanager/clangpchmanager.qbs
@@ -5,6 +5,7 @@ QtcPlugin {
name: "ClangPchManager"
Depends { name: "libclang"; required: false }
+ Depends { name: "clang_defines" }
condition: libclang.present && libclang.toolingEnabled
Depends { name: "ClangSupport" }
@@ -14,19 +15,7 @@ QtcPlugin {
Depends { name: "CppTools" }
Depends { name: "ProjectExplorer" }
- cpp.defines: {
- var defines = base;
- defines.push("CLANGPCHMANAGER_LIB");
-
- // The following defines are used to determine the clang include path for intrinsics.
- defines.push('CLANG_VERSION="' + libclang.llvmVersion + '"');
- var resourceDir = FileInfo.joinPaths(libclang.llvmLibDir, "clang", libclang.llvmVersion,
- "include");
- defines.push('CLANG_RESOURCE_DIR="' + resourceDir + '"');
- defines.push('CLANG_BINDIR="' + libclang.llvmBinDir + '"');
- return defines;
- }
-
+ cpp.defines: base.concat("CLANGPCHMANAGER_LIB")
cpp.includePaths: ["."]
files: [