Docker: Fix bug with cmake warnings for compiler path with docker kits

Task-number: QTCREATORBUG-26857
Change-Id: I6400008d489167e43f0c34d95841140697dd62de
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Adam Treat
2022-05-27 23:05:50 -04:00
parent abd289190e
commit 383ea8a361

View File

@@ -1219,7 +1219,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
if (!tcC || !tcC->isValid()) { if (!tcC || !tcC->isValid()) {
addWarning(tr("CMake configuration has a path to a C compiler set, " addWarning(tr("CMake configuration has a path to a C compiler set, "
"even though the kit has no valid tool chain.")); "even though the kit has no valid tool chain."));
} else if (tcCPath != tcC->compilerCommand()) { } else if (tcCPath != tcC->compilerCommand() && tcCPath != tcC->compilerCommand().onDevice(tcCPath)) {
addWarning(tr("CMake configuration has a path to a C compiler set " addWarning(tr("CMake configuration has a path to a C compiler set "
"that does not match the compiler path " "that does not match the compiler path "
"configured in the tool chain of the kit.")); "configured in the tool chain of the kit."));
@@ -1235,7 +1235,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
if (!tcCxx || !tcCxx->isValid()) { if (!tcCxx || !tcCxx->isValid()) {
addWarning(tr("CMake configuration has a path to a C++ compiler set, " addWarning(tr("CMake configuration has a path to a C++ compiler set, "
"even though the kit has no valid tool chain.")); "even though the kit has no valid tool chain."));
} else if (tcCxxPath != tcCxx->compilerCommand()) { } else if (tcCxxPath != tcCxx->compilerCommand() && tcCxxPath != tcCxx->compilerCommand().onDevice(tcCxxPath)) {
addWarning(tr("CMake configuration has a path to a C++ compiler set " addWarning(tr("CMake configuration has a path to a C++ compiler set "
"that does not match the compiler path " "that does not match the compiler path "
"configured in the tool chain of the kit.")); "configured in the tool chain of the kit."));