forked from hyperic/sigar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (43 loc) · 1.34 KB
/
CMakeLists.txt
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
MACRO(SIGAR_TEST name)
ADD_EXECUTABLE(${name} ${name}.c)
TARGET_LINK_LIBRARIES(${name} sigar)
ADD_TEST(${name} ${name})
ENDMACRO(SIGAR_TEST name)
INCLUDE_DIRECTORIES(../include/)
MESSAGE(STATUS "CMAKE_SYSTEM_NAME is ${CMAKE_SYSTEM_NAME}")
## linux
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ADD_DEFINITIONS(-DSIGAR_TEST_OS_LINUX)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
## macosx, freebsd
IF(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
ADD_DEFINITIONS(-DSIGAR_TEST_OS_DARWIN)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
## solaris
IF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)" )
ADD_DEFINITIONS(-DSIGAR_TEST_OS_SOLARIS)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)" )
## solaris
IF (CMAKE_SYSTEM_NAME MATCHES "(hpux)" )
ADD_DEFINITIONS(-DSIGAR_TEST_OS_HPUX)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "(hpux)" )
## aix
IF (CMAKE_SYSTEM_NAME MATCHES "(AIX)" )
ADD_DEFINITIONS(-DSIGAR_TEST_OS_AIX)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "(AIX)" )
IF(WIN32)
ADD_DEFINITIONS(-DSIGAR_TEST_OS_WIN32)
ENDIF(WIN32)
SIGAR_TEST(t_sigar_cpu)
SIGAR_TEST(t_sigar_fs)
SIGAR_TEST(t_sigar_loadavg)
SIGAR_TEST(t_sigar_mem)
SIGAR_TEST(t_sigar_netconn)
SIGAR_TEST(t_sigar_netif)
SIGAR_TEST(t_sigar_pid)
SIGAR_TEST(t_sigar_proc)
SIGAR_TEST(t_sigar_reslimit)
SIGAR_TEST(t_sigar_swap)
SIGAR_TEST(t_sigar_sysinfo)
SIGAR_TEST(t_sigar_uptime)
# SIGAR_TEST(t_sigar_version)