forked from qt-creator/qt-creator
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: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user