KWSys: Pass ptrdiff_t check result to System.c

Since commit "Provide unix-sytle command line parsing" (2009-07-13) the
reference to KWSYS_C_HAS_PTRDIFF_T in System.c has been meaningless
because the macro was never passed to the compiler!
This commit is contained in:
Brad King 2010-06-29 08:45:33 -04:00
parent d2222d529d
commit 5c16024fbb
1 changed files with 8 additions and 9 deletions

View File

@ -601,6 +601,14 @@ ENDIF(KWSYS_BUILD_SHARED)
#-----------------------------------------------------------------------------
# Configure some implementation details.
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 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.
SET_SOURCE_FILES_PROPERTIES(SystemTools.cxx PROPERTIES
@ -785,15 +793,6 @@ 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)