diff options
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index c5e307cfb7..25120aea9e 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -272,6 +272,8 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP const int targetDefinitionLine = target.backtrace.last().line; // Have a fresh look at the CMake file, not relying on a cached value + Core::DocumentManager::saveModifiedDocumentSilently( + Core::DocumentModel::documentForFilePath(targetCMakeFile)); expected_str<QByteArray> fileContent = targetCMakeFile.fileContents(); cmListFile cmakeListFile; std::string errorString; @@ -397,6 +399,8 @@ CMakeBuildSystem::projectFileArgumentPosition(const QString &targetName, const Q const FilePath targetCMakeFile = target.backtrace.last().path; // Have a fresh look at the CMake file, not relying on a cached value + Core::DocumentManager::saveModifiedDocumentSilently( + Core::DocumentModel::documentForFilePath(targetCMakeFile)); expected_str<QByteArray> fileContent = targetCMakeFile.fileContents(); cmListFile cmakeListFile; std::string errorString; |