summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-29 12:44:33 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-29 12:50:03 (GMT)
commitd2222d529d957eef48078c617bdef213961276d8 (patch)
tree6bfcd9b174875505b271fdf22bfc60acbcf0dd87 /Source/kwsys/CMakeLists.txt
parent198e00f6e8341da9804f69c0821222f2d999b3ef (diff)
downloadCMake-d2222d529d957eef48078c617bdef213961276d8.zip
CMake-d2222d529d957eef48078c617bdef213961276d8.tar.gz
CMake-d2222d529d957eef48078c617bdef213961276d8.tar.bz2
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".
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r--Source/kwsys/CMakeLists.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index f440ff9..5e725e4 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -141,12 +141,6 @@ 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)
@@ -605,6 +599,15 @@ ELSE(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.
IF(NOT KWSYS_HEADER_ROOT)
SET(KWSYS_HEADER_ROOT "${PROJECT_BINARY_DIR}")