diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-08-01 19:26:04 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-08-01 19:26:04 (GMT) |
commit | e0e32400af0edf7c621ca087377a8088b9b4d486 (patch) | |
tree | 0901384d8af3af99b46035073924552055aa0702 /Utilities | |
parent | 612d2f667b16bfe8f589ebb80242f34b219b979e (diff) | |
download | CMake-e0e32400af0edf7c621ca087377a8088b9b4d486.zip CMake-e0e32400af0edf7c621ca087377a8088b9b4d486.tar.gz CMake-e0e32400af0edf7c621ca087377a8088b9b4d486.tar.bz2 |
ENH: add a try compile test for makedev_three_args
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmtar/CMakeLists.txt | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt index a56fc84..39910a5 100644 --- a/Utilities/cmtar/CMakeLists.txt +++ b/Utilities/cmtar/CMakeLists.txt @@ -236,7 +236,25 @@ SET (HAVE_LIBZ 1) #SET (HAVE_UNISTD_H 1) SET (MAJOR_IN_MKDEV 0) SET (MAJOR_IN_SYSMACROS 0) -SET (MAKEDEV_THREE_ARGS 0) + +SET(CMAKE_MAKEDEV_SOURCE) +FOREACH(FILE ${HEADER_INCLUDES}) + SET(CMAKE_MAKEDEV_SOURCE + "${CMAKE_MAKEDEV_SOURCE}#include <${FILE}>\n") +ENDFOREACH(FILE) +SET(CMAKE_MAKEDEV_SOURCE + "${CMAKE_MAKEDEV_SOURCE} +int main () +{ + major_t maj = 5; + minor_t min = 7; + makedev(0, maj, min); + return 0; +} +") +INCLUDE(CheckCSourceCompiles) +CHECK_C_SOURCE_COMPILES("${CMAKE_MAKEDEV_SOURCE}" MAKEDEV_THREE_ARGS) +#SET (MAKEDEV_THREE_ARGS 0) #SET (NEED_BASENAME 0) #SET (NEED_DIRNAME 0) #SET (NEED_FNMATCH 1) |