clangcodemodel: Use forward slashes for CLANG_RESOURCE_DIR define

Adapt qmake and qbs files, fixing warnings on Windows:
clangutils.cpp(78): warning C4129: 'o': unrecognized character escape sequence
clangutils.cpp(78): warning C4129: 'L': unrecognized character escape sequence
clangutils.cpp(78): warning C4129: 'l': unrecognized character escape sequence

Change-Id: I7a5fe674665437582457645f2a081e1e38d5df77
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Friedemann Kleint
2016-10-21 11:11:33 +02:00
parent 7473469005
commit e6b23dc2e5
2 changed files with 5 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
var Environment = loadExtension("qbs.Environment")
var File = loadExtension("qbs.File")
var FileInfo = loadExtension("qbs.FileInfo")
var MinimumLLVMVersion = "3.8.0"
var Process = loadExtension("qbs.Process")
@@ -57,12 +58,12 @@ function llvmConfig(qbs, qtcFunctions)
function includeDir(llvmConfig)
{
return readOutput(llvmConfig, ["--includedir"])
return FileInfo.toNativeSeparators(readOutput(llvmConfig, ["--includedir"]));
}
function libDir(llvmConfig)
{
return readOutput(llvmConfig, ["--libdir"])
return FileInfo.toNativeSeparators(readOutput(llvmConfig, ["--libdir"]));
}
function version(llvmConfig)

View File

@@ -3,7 +3,8 @@ include(../../shared/clang/clang_installation.pri)
# The following defines are used to determine the clang include path for intrinsics.
DEFINES += CLANG_VERSION=\\\"$${LLVM_VERSION}\\\"
DEFINES += "\"CLANG_RESOURCE_DIR=\\\"$${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include\\\"\""
CLANG_RESOURCE_DIR=$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)
DEFINES += "\"CLANG_RESOURCE_DIR=\\\"$${CLANG_RESOURCE_DIR}\\\"\""
SOURCES += \
clangactivationsequencecontextprocessor.cpp \