From ec9a6f693c4ec6c089bcac83ec3df513b353aa19 Mon Sep 17 00:00:00 2001 From: hoffman Date: Tue, 22 Sep 2009 19:58:10 +0000 Subject: [PATCH] Can not use cmakedefine in kwsys because bootstrap of cmake does not support it. --- Source/kwsys/CMakeLists.txt | 7 ++++++- Source/kwsys/Configure.hxx.in | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 9e7b12794..32976189a 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -139,11 +139,16 @@ IF(COMMAND SET_PROPERTY) "KWSYS_HEADER(%)=<${KWSYS_NAMESPACE}/%>" ) 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. IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_ENABLE_C 1) - # Enable all components. SET(KWSYS_USE_Base64 1) SET(KWSYS_USE_Directory 1) diff --git a/Source/kwsys/Configure.hxx.in b/Source/kwsys/Configure.hxx.in index 5f9571858..d455a37ee 100644 --- a/Source/kwsys/Configure.hxx.in +++ b/Source/kwsys/Configure.hxx.in @@ -18,7 +18,13 @@ #include <@KWSYS_NAMESPACE@/Configure.h> /* Disable cleanup of putenv memory for issues with GCOV */ -#cmakedefine KWSYS_DO_NOT_CLEAN_PUTENV +#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. */ #define @KWSYS_NAMESPACE@_IOS_USE_ANSI @KWSYS_IOS_USE_ANSI@ -- 2.11.4.GIT