summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-04 21:27:17 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-04 21:27:17 (GMT)
commit40adb2ce0330020600424430fa52d743e4d504db (patch)
tree97121b6f5b2de801c8e1125cb67e67460dc180b8 /Source/kwsys/CMakeLists.txt
parent6c19d3a86239882545ddc4dad11fe0c8d32f37ae (diff)
downloadCMake-40adb2ce0330020600424430fa52d743e4d504db.zip
CMake-40adb2ce0330020600424430fa52d743e4d504db.tar.gz
CMake-40adb2ce0330020600424430fa52d743e4d504db.tar.bz2
ENH: Adding tests KWSYS_C_HAS_PTRDIFF_T and KWSYS_C_HAS_SSIZE_T to help ProcessUNIX.c build everywhere without warnings.
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r--Source/kwsys/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index d85033c..54ff8b8 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -621,6 +621,15 @@ IF(KWSYS_USE_Process)
ELSE(NOT UNIX)
# Use the UNIX implementation.
SET(KWSYS_C_SRCS ${KWSYS_C_SRCS} ProcessUNIX.c)
+
+ # Help ProcessUNIX.c compile properly on all platforms.
+ KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_PTRDIFF_T
+ "Checking whether C compiler has ptrdiff_t in stddef.h" DIRECT)
+ KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_SSIZE_T
+ "Checking whether C compiler has ssize_t in unistd.h" DIRECT)
+ SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c PROPERTIES
+ COMPILE_FLAGS "-DKWSYS_C_HAS_PTRDIFF_T=${KWSYS_C_HAS_PTRDIFF_T} -DKWSYS_C_HAS_SSIZE_T=${KWSYS_C_HAS_SSIZE_T}"
+ )
ENDIF(NOT UNIX)
ENDIF(KWSYS_USE_Process)