forked from qt-creator/qt-creator
qbs: apply compiler and linker flags from GCC toolchains.
Change-Id: I27ce0b11238a2a0c9e5f2f1f8d9e5ecfa3cc51f9 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
#include "qbsconstants.h"
|
#include "qbsconstants.h"
|
||||||
|
|
||||||
#include <projectexplorer/abi.h>
|
#include <projectexplorer/abi.h>
|
||||||
|
#include <projectexplorer/gcctoolchain.h>
|
||||||
#include <projectexplorer/kit.h>
|
#include <projectexplorer/kit.h>
|
||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
@@ -255,6 +256,11 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
|||||||
}
|
}
|
||||||
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
|
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
|
||||||
|
|
||||||
|
if (ProjectExplorer::GccToolChain *gcc = dynamic_cast<ProjectExplorer::GccToolChain *>(tc)) {
|
||||||
|
data.insert(QLatin1String(CPP_PLATFORMCOMMONCOMPILERFLAGS), gcc->platformCodeGenFlags());
|
||||||
|
data.insert(QLatin1String(CPP_PLATFORMLINKERFLAGS), gcc->platformLinkerFlags());
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Remove this once compiler version properties are set for MSVC
|
// TODO: Remove this once compiler version properties are set for MSVC
|
||||||
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|
||||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
|
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ const char CPP_COMPILERVERSIONPATCH[] = "cpp.compilerVersionPatch";
|
|||||||
const char CPP_LINKERNAME[] = "cpp.linkerName";
|
const char CPP_LINKERNAME[] = "cpp.linkerName";
|
||||||
const char CPP_PLATFORMCFLAGS[] = "cpp.platformCFlags";
|
const char CPP_PLATFORMCFLAGS[] = "cpp.platformCFlags";
|
||||||
const char CPP_PLATFORMCXXFLAGS[] = "cpp.platformCxxFlags";
|
const char CPP_PLATFORMCXXFLAGS[] = "cpp.platformCxxFlags";
|
||||||
|
const char CPP_PLATFORMCOMMONCOMPILERFLAGS[] = "cpp.platformCommonCompilerFlags";
|
||||||
|
const char CPP_PLATFORMLINKERFLAGS[] = "cpp.platformLinkerFlags";
|
||||||
const char CPP_PLATFORMPATH[] = "cpp.platformPath";
|
const char CPP_PLATFORMPATH[] = "cpp.platformPath";
|
||||||
const char CPP_XCODESDKNAME[] = "cpp.xcodeSdkName";
|
const char CPP_XCODESDKNAME[] = "cpp.xcodeSdkName";
|
||||||
const char CPP_XCODESDKVERSION[] = "cpp.xcodeSdkVersion";
|
const char CPP_XCODESDKVERSION[] = "cpp.xcodeSdkVersion";
|
||||||
|
|||||||
Reference in New Issue
Block a user