Put a flag in that will stop system tools from deleting system environment memory on exit, as it can cause gcov to crash the programs.

This commit is contained in:
Bill Hoffman 2009-09-22 14:56:33 -04:00
parent 03d032b637
commit e7601ca600
2 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,9 @@
/* Include C configuration. */ /* Include C configuration. */
#include <@KWSYS_NAMESPACE@/Configure.h> #include <@KWSYS_NAMESPACE@/Configure.h>
/* Disable cleanup of putenv memory for issues with GCOV */
#cmakedefine KWSYS_DO_NOT_CLEAN_PUTENV
/* Whether ANSI C++ stream headers are to be used. */ /* Whether ANSI C++ stream headers are to be used. */
#define @KWSYS_NAMESPACE@_IOS_USE_ANSI @KWSYS_IOS_USE_ANSI@ #define @KWSYS_NAMESPACE@_IOS_USE_ANSI @KWSYS_IOS_USE_ANSI@

View File

@ -415,11 +415,13 @@ public:
kwsysDeletingCharVector::~kwsysDeletingCharVector() kwsysDeletingCharVector::~kwsysDeletingCharVector()
{ {
#ifndef KWSYS_DO_NOT_CLEAN_PUTENV
for(kwsys_stl::vector<char*>::iterator i = this->begin(); for(kwsys_stl::vector<char*>::iterator i = this->begin();
i != this->end(); ++i) i != this->end(); ++i)
{ {
delete []*i; delete []*i;
} }
#endif
} }
bool SystemTools::PutEnv(const char* value) bool SystemTools::PutEnv(const char* value)
{ {