Skip to content
Snippets Groups Projects
Commit 62c00cfa authored by Oleksii Serdiuk's avatar Oleksii Serdiuk Committed by hjk
Browse files

CMake: Fix for "The source directory does not contain CMakeLists.txt".


CMakeBuildInfo::sourceDirectory wasn't always populated, which sometimes
led to 'CMake Error: The source directory "<path>" does not appear to
contain CMakeLists.txt.' error when re-running CMake for shadow builds.

Change-Id: I4caece897155ee9e056d2da8185da43b94cbd99d
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 9705ed8a
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,9 @@
#include <projectexplorer/buildinfo.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/target.h>
#include <projectexplorer/project.h>
#include <utils/environment.h>
#include <utils/qtcassert.h>
namespace CMakeProjectManager {
......@@ -53,6 +55,9 @@ public:
kitId = bc->target()->kit()->id();
environment = bc->environment();
useNinja = bc->useNinja();
QTC_ASSERT(bc->target()->project(), return);
sourceDirectory = bc->target()->project()->projectDirectory();
}
Utils::Environment environment;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment