diff options
author | Brad King <brad.king@kitware.com> | 2010-06-29 12:45:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-06-29 12:50:03 (GMT) |
commit | 5c16024fbb3388f8345683263c584f5518fdfa55 (patch) | |
tree | d6265d27fd52035615a73599a7205291f54de9a7 /Source/kwsys/CMakeLists.txt | |
parent | d2222d529d957eef48078c617bdef213961276d8 (diff) | |
download | CMake-5c16024fbb3388f8345683263c584f5518fdfa55.zip CMake-5c16024fbb3388f8345683263c584f5518fdfa55.tar.gz CMake-5c16024fbb3388f8345683263c584f5518fdfa55.tar.bz2 |
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!
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 5e725e4..083629a 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -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) |