BUG: Avoid std::unique algorithm on VMS

The Compaq compiler's std::unique algorithm followed by deletion of the
extra elements seems to crash.  For now we'll accept the duplicate
dependencies on this platform.
This commit is contained in:
Brad King 2009-06-10 13:02:18 -04:00
parent 057400d9b4
commit b5394e9600
1 changed files with 2 additions and 0 deletions

View File

@ -303,9 +303,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
}
// Sort the list and remove duplicates.
std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
#if !defined(__VMS) // The Compaq STL on VMS crashes, so accept duplicates.
std::vector<std::string>::iterator new_end =
std::unique(lfiles.begin(),lfiles.end());
lfiles.erase(new_end, lfiles.end());
#endif
// reset lg to the first makefile
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);