forked from qt-creator/qt-creator
cmakeprojectmanager: save files before build
This code path (CMakeBuildSystem::buildCMakeTarget) is taken when building a specific target, such as when activating Build > Build for Run Configuration. Building via e.g. Ctrl+B takes a different code path, so this shouldn't be called more than necessary. Fixes: QTCREATORBUG-25276 Change-Id: I362bafda43460eaeac9cbf0f053bf457a76702f1 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
committed by
Cristian Adam
parent
48422187fc
commit
b5ff180f8c
@@ -43,6 +43,7 @@
|
||||
#include <cpptools/cpptoolsconstants.h>
|
||||
#include <cpptools/generatedcodemodelsupport.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
@@ -454,6 +455,7 @@ void CMakeBuildSystem::runCMakeWithExtraArguments()
|
||||
void CMakeBuildSystem::buildCMakeTarget(const QString &buildTarget)
|
||||
{
|
||||
QTC_ASSERT(!buildTarget.isEmpty(), return);
|
||||
if (ProjectExplorerPlugin::saveModifiedFiles())
|
||||
cmakeBuildConfiguration()->buildTarget(buildTarget);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user