summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-05-01 18:09:12 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-05-01 18:09:12 (GMT)
commitc75f404065590d029d91779e4b113340303559f9 (patch)
tree42bddaa9cfc573f038bf7a4a0d5639f5e31ca36a /Source/kwsys/CMakeLists.txt
parent203be17fd0d519f3f782d29a900d398528fcce6d (diff)
parente48796b26b5b2b75401b48d21927b1d2912d4dca (diff)
downloadCMake-c75f404065590d029d91779e4b113340303559f9.zip
CMake-c75f404065590d029d91779e4b113340303559f9.tar.gz
CMake-c75f404065590d029d91779e4b113340303559f9.tar.bz2
Merge topic 'kwsys-environ-cleanup'
e48796b KWSys: Fix SystemTools environment memory handling (#13156) b10c5cb CTest: Simplify environment save/restore
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r--Source/kwsys/CMakeLists.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index ca496ab..520cafb 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -552,11 +552,16 @@ SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c System.c PROPERTIES
COMPILE_FLAGS "-DKWSYS_C_HAS_PTRDIFF_T=${KWSYS_C_HAS_PTRDIFF_T} -DKWSYS_C_HAS_SSIZE_T=${KWSYS_C_HAS_SSIZE_T}"
)
-IF(KWSYS_DO_NOT_CLEAN_PUTENV)
- # Disable cleanup of putenv memory for issues with GCOV.
+IF(KWSYS_USE_SystemTools)
+ KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_SETENV
+ "Checking whether CXX compiler has setenv" DIRECT)
+ KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UNSETENV
+ "Checking whether CXX compiler has unsetenv" DIRECT)
+ KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
+ "Checking whether CXX compiler has environ in stdlib.h" DIRECT)
SET_SOURCE_FILES_PROPERTIES(SystemTools.cxx PROPERTIES
- COMPILE_FLAGS -DKWSYS_DO_NOT_CLEAN_PUTENV=1)
-ENDIF(KWSYS_DO_NOT_CLEAN_PUTENV)
+ COMPILE_FLAGS "-DKWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV} -DKWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV} -DKWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=${KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H}")
+ENDIF()
#-----------------------------------------------------------------------------
# Choose a directory for the generated headers.