summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-02-10 22:04:32 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-02-10 22:04:32 (GMT)
commitc3800e54583208ac4a6435884bb8832e72af3183 (patch)
tree12e2b0c67f170e1521cb013b79becc0c419e1a5a /Source/cmMakefile.cxx
parentee3295e91740033ebe9d9a0c800c0a3070108624 (diff)
downloadCMake-c3800e54583208ac4a6435884bb8832e72af3183.zip
CMake-c3800e54583208ac4a6435884bb8832e72af3183.tar.gz
CMake-c3800e54583208ac4a6435884bb8832e72af3183.tar.bz2
cmAlgorithms: add cmEraseIf function
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index bfe46ae..618f694 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -653,21 +653,12 @@ void cmMakefile::FinalPass()
// we don't want cmake to re-run if a configured file is created and deleted
// during processing as that would make it a transient file that can't
// influence the build process
-
- // remove_if will move all items that don't have a valid file name to the
- // back of the vector
- std::vector<std::string>::iterator new_output_files_end = std::remove_if(
- this->OutputFiles.begin(), this->OutputFiles.end(), file_not_persistent());
- // we just have to erase all items at the back
- this->OutputFiles.erase(new_output_files_end, this->OutputFiles.end());
+ cmEraseIf(this->OutputFiles, file_not_persistent());
// if a configured file is used as input for another configured file,
// and then deleted it will show up in the input list files so we
// need to scan those too
- std::vector<std::string>::iterator new_list_files_end = std::remove_if(
- this->ListFiles.begin(), this->ListFiles.end(), file_not_persistent());
-
- this->ListFiles.erase(new_list_files_end, this->ListFiles.end());
+ cmEraseIf(this->ListFiles, file_not_persistent());
}
// Generate the output file