forked from qt-creator/qt-creator
CppEditor: Prevent /TC and /TP with Objective-C files
This is relevant when clang-cl is used to compile Objective-C projects. Task-number: QTCREATORBUG-28369 Change-Id: If8ae4dfaa07bf2ec81fbbec358663617c430b9e2 Reviewed-by: Frederik Seiffert <frederik@algoriddim.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -119,10 +119,12 @@ static QJsonObject createFileObject(const FilePath &buildDir,
|
||||
const ProjectFile::Kind kind = ProjectFile::classify(projFile.path);
|
||||
if (projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
|
||||
|| projectPart.toolchainType == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID) {
|
||||
if (ProjectFile::isC(kind))
|
||||
args.append("/TC");
|
||||
else if (ProjectFile::isCxx(kind))
|
||||
args.append("/TP");
|
||||
if (!ProjectFile::isObjC(kind)) {
|
||||
if (ProjectFile::isC(kind))
|
||||
args.append("/TC");
|
||||
else if (ProjectFile::isCxx(kind))
|
||||
args.append("/TP");
|
||||
}
|
||||
} else {
|
||||
QStringList langOption
|
||||
= createLanguageOptionGcc(projectPart.language, kind,
|
||||
|
||||
Reference in New Issue
Block a user