From 24511d755f1cc94e5d30403782d7a48a8487509b Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 2 Apr 2024 10:28:57 +0200 Subject: [PATCH] CMake: Add hint about missing docker mounts Change-Id: Id046496b1c9907dfdfedb36c6bec1b121428f37a Reviewed-by: Cristian Adam --- src/plugins/cmakeprojectmanager/cmakeprocess.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeprocess.cpp b/src/plugins/cmakeprojectmanager/cmakeprocess.cpp index 40cc41d64a5..c0a41b817d1 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprocess.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprocess.cpp @@ -58,11 +58,15 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList & const FilePath cmakeExecutable = cmake->cmakeExecutable(); + const QString mountHint = ::CMakeProjectManager::Tr::tr( + "You may need to add the project directory to the list of directories that are mounted by " + "the build device."); + if (!cmakeExecutable.ensureReachable(parameters.sourceDirectory)) { const QString msg = ::CMakeProjectManager::Tr::tr( "The source directory %1 is not reachable by the CMake executable %2.") .arg(parameters.sourceDirectory.displayName()).arg(cmakeExecutable.displayName()); - BuildSystem::appendBuildSystemOutput(addCMakePrefix({QString(), msg}).join('\n')); + BuildSystem::appendBuildSystemOutput(addCMakePrefix({QString(), msg, mountHint}).join('\n')); emit finished(failedToStartExitCode); return; } @@ -71,7 +75,7 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList & const QString msg = ::CMakeProjectManager::Tr::tr( "The build directory %1 is not reachable by the CMake executable %2.") .arg(parameters.buildDirectory.displayName()).arg(cmakeExecutable.displayName()); - BuildSystem::appendBuildSystemOutput(addCMakePrefix({QString(), msg}).join('\n')); + BuildSystem::appendBuildSystemOutput(addCMakePrefix({QString(), msg, mountHint}).join('\n')); emit finished(failedToStartExitCode); return; }