summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeBackwardCompatibilityC.cmake
blob: b9a3a85a4a481023b13c01e9e0d568b8ca749376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Nothing here yet

INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
CHECK_TYPE_SIZE(int      CMAKE_SIZEOF_INT)
CHECK_TYPE_SIZE(long     CMAKE_SIZEOF_LONG)
CHECK_TYPE_SIZE("void*"  CMAKE_SIZEOF_VOID_P)
CHECK_TYPE_SIZE(char     CMAKE_SIZEOF_CHAR)
CHECK_TYPE_SIZE(short    CMAKE_SIZEOF_SHORT)
CHECK_TYPE_SIZE(float    CMAKE_SIZEOF_FLOAT)
CHECK_TYPE_SIZE(double   CMAKE_SIZEOF_DOUBLE)

INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
CHECK_FUNCTION_EXISTS(connect       CMAKE_HAVE_CONNECT)
CHECK_FUNCTION_EXISTS(remove        CMAKE_HAVE_REMOVE)

INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_HAVE_GETHOSTBYNAME)
CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_HAVE_GETHOSTBYNAME)

INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
CHECK_INCLUDE_FILE("limits.h"       CMAKE_HAVE_LIMITS_H)
CHECK_INCLUDE_FILE("unistd.h"       CMAKE_HAVE_UNISTD_H)
CHECK_INCLUDE_FILE("sys/prctl.h"    CMAKE_HAVE_SYS_PRCTL_H)
CHECK_INCLUDE_FILE("pthread.h"      CMAKE_HAVE_PTHREAD_H)

INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/FindThreads.cmake)

SET (CMAKE_THREAD_LIBS        "${CMAKE_THREAD_LIBS}" CACHE STRING 
    "Thread library used.")

SET (CMAKE_USE_PTHREADS       "${CMAKE_USE_PTHREADS}" CACHE BOOL
     "Use the pthreads library.")

SET (CMAKE_USE_WIN32_THREADS  "${CMAKE_USE_WIN32_THREADS}" CACHE BOOL
       "Use the win32 thread library.")

SET (CMAKE_HP_PTHREADS        ${CMAKE_HP_PTHREADS} CACHE BOOL
     "Use HP pthreads.")

SET (CMAKE_USE_SPROC          ${CMAKE_USE_SPROC} CACHE BOOL 
     "Use sproc libs.")

MARK_AS_ADVANCED(
CMAKE_THREAD_LIBS
CMAKE_USE_PTHREADS
CMAKE_USE_WIN32_THREADS
CMAKE_USE_SPROC
CMAKE_HP_PTHREADS)