diff --git a/NEWS.md b/NEWS.md index 5f40256c..a93ec0fb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ Version 0.6.0 - change: auto open a new editor at start - enhancement: todo view - add: about dialog + - implement: correctly recognize clang (msys2 build) Version 0.5.0 - enhancement: support C++ using type alias; diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 4ed38a30..99a1435b 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -1282,6 +1282,7 @@ Settings::CompilerSet::CompilerSet(const Settings::CompilerSet &set): mName(set.mName), mDefines(set.mDefines), mTarget(set.mTarget), + mCompilerType(set.mCompilerType), mUseCustomCompileParams(set.mUseCustomCompileParams), mUseCustomLinkParams(set.mUseCustomLinkParams), mCustomCompileParams(set.mCustomCompileParams), @@ -1726,36 +1727,50 @@ void Settings::CompilerSet::setProperties(const QString &binDir) mTarget = "i686"; //Find version number - targetStr = "gcc version "; + targetStr = "clang version "; delimPos1 = output.indexOf(targetStr); - if (delimPos1<0) - return; // unknown binary - delimPos1+=strlen(targetStr); - delimPos2 = delimPos1; - while (delimPos2=0) { + mCompilerType = "Clang"; + delimPos1+=strlen(targetStr); + delimPos2 = delimPos1; + while (delimPos2