forked from qt-creator/qt-creator
CMake: Fix warnings for docker related items
Paths to build related items seen by cmake are always relative to device cmake runs on, i.e. the build device, so they should not have global prefixes like docker://abc. Change-Id: Ia919dc6a0cc6430d42e75cc6424311ce6ed47e44 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1061,8 +1061,8 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
|
||||
const CMakeConfig config = configuration(k);
|
||||
|
||||
const bool isQt4 = version && version->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0);
|
||||
FilePath qmakePath;
|
||||
QStringList qtInstallDirs;
|
||||
FilePath qmakePath; // This is relative to the cmake used for building.
|
||||
QStringList qtInstallDirs; // This is relativ to the cmake used for building.
|
||||
FilePath tcCPath;
|
||||
FilePath tcCxxPath;
|
||||
for (const CMakeConfigItem &i : config) {
|
||||
@@ -1076,7 +1076,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
|
||||
else if (i.key == CMAKE_CXX_TOOLCHAIN_KEY)
|
||||
tcCxxPath = expandedValue;
|
||||
else if (i.key == CMAKE_PREFIX_PATH_KEY)
|
||||
qtInstallDirs = CMakeConfigItem::cmakeSplitValue(expandedValue.toString());
|
||||
qtInstallDirs = CMakeConfigItem::cmakeSplitValue(expandedValue.path());
|
||||
}
|
||||
|
||||
Tasks result;
|
||||
@@ -1100,7 +1100,7 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
|
||||
"configured in the Qt version."));
|
||||
}
|
||||
}
|
||||
if (version && !qtInstallDirs.contains(version->prefix().toString()) && !isQt4) {
|
||||
if (version && !qtInstallDirs.contains(version->prefix().path()) && !isQt4) {
|
||||
if (version->isValid()) {
|
||||
addWarning(tr("CMake configuration has no CMAKE_PREFIX_PATH set "
|
||||
"that points to the kit Qt version."));
|
||||
|
||||
Reference in New Issue
Block a user