Commit 997eb98e authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

GenericProject: Changed the way C++11 is specified

Pass it as compiler flag, which makes sure that not only cxxVersion
is set correctly (depending on the compiler) but that also the
toolchainDefines are the right ones for C++11 (most significantly,
the value of __cplusplus which affects STL features).

Change-Id: I53dd543b30b7fc2824283ec119d7d5261f50f130
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 38e61ea5
......@@ -252,12 +252,14 @@ void GenericProject::refresh(RefreshOptions options)
Kit *k = activeTarget() ? activeTarget()->kit() : KitManager::defaultKit();
if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) {
QStringList cxxflags; // FIXME: Can we do better?
part->evaluateToolchain(tc, cxxflags, cxxflags,
QStringList cflags;
QStringList cxxflags;
cxxflags << QLatin1String("-std=c++11");
part->evaluateToolchain(tc, cxxflags, cflags,
SysRootKitInformation::sysRoot(k));
}
part->cxxVersion = CppTools::ProjectPart::CXX11; // assume C++11
part->projectConfigFile = configFileName();
// ### add _defines.
......
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