KWSys: Cleanup putenv leak option implementation
Define KWSYS_DO_NOT_CLEAN_PUTENV only for the implementation. It does not need to be configured in the interface of "Configure.hxx".
This commit is contained in:
parent
198e00f6e8
commit
d2222d529d
|
@ -141,12 +141,6 @@ IF(COMMAND SET_PROPERTY)
|
||||||
"KWSYS_HEADER(%)=<${KWSYS_NAMESPACE}/%>"
|
"KWSYS_HEADER(%)=<${KWSYS_NAMESPACE}/%>"
|
||||||
)
|
)
|
||||||
ENDIF(COMMAND SET_PROPERTY)
|
ENDIF(COMMAND SET_PROPERTY)
|
||||||
# add option to disable memory cleanup at exit of putenv memory
|
|
||||||
IF(DEFINED KWSYS_DO_NOT_CLEAN_PUTENV)
|
|
||||||
SET(KWSYS_DO_NOT_CLEAN_PUTENV 1)
|
|
||||||
ELSE(DEFINED KWSYS_DO_NOT_CLEAN_PUTENV)
|
|
||||||
SET(KWSYS_DO_NOT_CLEAN_PUTENV 0)
|
|
||||||
ENDIF(DEFINED KWSYS_DO_NOT_CLEAN_PUTENV)
|
|
||||||
|
|
||||||
# Select library components.
|
# Select library components.
|
||||||
IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
|
IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
|
||||||
|
@ -604,6 +598,15 @@ ELSE(KWSYS_BUILD_SHARED)
|
||||||
SET(KWSYS_LIBRARY_TYPE STATIC)
|
SET(KWSYS_LIBRARY_TYPE STATIC)
|
||||||
ENDIF(KWSYS_BUILD_SHARED)
|
ENDIF(KWSYS_BUILD_SHARED)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Configure some implementation details.
|
||||||
|
|
||||||
|
IF(KWSYS_DO_NOT_CLEAN_PUTENV)
|
||||||
|
# Disable cleanup of putenv memory for issues with GCOV.
|
||||||
|
SET_SOURCE_FILES_PROPERTIES(SystemTools.cxx PROPERTIES
|
||||||
|
COMPILE_FLAGS -DKWSYS_DO_NOT_CLEAN_PUTENV=1)
|
||||||
|
ENDIF(KWSYS_DO_NOT_CLEAN_PUTENV)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Choose a directory for the generated headers.
|
# Choose a directory for the generated headers.
|
||||||
IF(NOT KWSYS_HEADER_ROOT)
|
IF(NOT KWSYS_HEADER_ROOT)
|
||||||
|
|
|
@ -15,15 +15,6 @@
|
||||||
/* 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 */
|
|
||||||
#if @KWSYS_DO_NOT_CLEAN_PUTENV@
|
|
||||||
#define KWSYS_DO_NOT_CLEAN_PUTENV
|
|
||||||
#else
|
|
||||||
#undef KWSYS_DO_NOT_CLEAN_PUTENV
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* 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@
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue