forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14'
Conflicts: src/plugins/projectexplorer/gcctoolchain.cpp Change-Id: I2136ba89d3aa3c4c2a0e7a4f9d8ba9cec32924ce
This commit is contained in:
@@ -837,12 +837,16 @@ FilePath CMakeBuildSystem::workDirectory(const BuildDirParameters ¶meters)
|
||||
{
|
||||
const Utils::FilePath bdir = parameters.buildDirectory;
|
||||
const CMakeTool *cmake = parameters.cmakeTool();
|
||||
|
||||
// use the build directory if it already exists anyhow
|
||||
if (bdir.exists()) {
|
||||
m_buildDirToTempDir.erase(bdir);
|
||||
return bdir;
|
||||
}
|
||||
|
||||
if (cmake && cmake->autoCreateBuildDirectory()) {
|
||||
// use the build directory if the cmake tool settings are set to automatically create them,
|
||||
// or if the configuration was changed by the user
|
||||
if ((cmake && cmake->autoCreateBuildDirectory()) || !parameters.extraCMakeArguments.isEmpty()) {
|
||||
if (!cmakeBuildConfiguration()->createBuildDirectory())
|
||||
handleParsingFailed(
|
||||
tr("Failed to create build directory \"%1\".").arg(bdir.toUserOutput()));
|
||||
|
||||
Reference in New Issue
Block a user