Commit 897aa5d7 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

Put a flag in that will stop system tools from deleting system environment...

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.
parent 5c777f2d
......@@ -17,6 +17,9 @@
/* Include C configuration. */
#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. */
#define @KWSYS_NAMESPACE@_IOS_USE_ANSI @KWSYS_IOS_USE_ANSI@
......
......@@ -415,11 +415,13 @@ public:
kwsysDeletingCharVector::~kwsysDeletingCharVector()
{
#ifndef KWSYS_DO_NOT_CLEAN_PUTENV
for(kwsys_stl::vector<char*>::iterator i = this->begin();
i != this->end(); ++i)
{
delete []*i;
}
#endif
}
bool SystemTools::PutEnv(const char* value)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment