pcap_sg: fixed pcap read
[netsniff-ng.git] / src / CMakeLists.txt
blobc872ae42f3d2499c25acca14b540fba5b638f8e6
1 PROJECT(netsniff-ng-toolkit C)
3 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
5 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
6 SET(EXECUTABLE_INSTALL_PATH /usr/sbin)
7 SET(CONFIG_INSTALL_PATH /etc/netsniff-ng)
9 SET(VERSION "0.5.7")
11 INCLUDE(CheckBPFAttach)
12 INCLUDE(CheckPFPacket)
13 INCLUDE(CheckStrictAlign)
14 INCLUDE(CheckTxRing)
15 INCLUDE(Pod2Man)
17 ADD_DEFINITIONS(
18         -O3
19         -fstack-protector
20         -fpie
21         -std=gnu99
22         -fno-strict-aliasing
23         -D_FORTIFY_SOURCE=2
24         -D_REENTRANT
25         -march=native
26         -mtune=native
27         -Wall
28         -Wundef
29         -Wstrict-prototypes
30         -Werror-implicit-function-declaration
31         -Wformat=2
32         -Wcomments
33         -Wendif-labels
34         -Wuninitialized
35         -Winit-self
36         -Wstrict-overflow=1
37         -Wtype-limits
38         -Wmissing-parameter-type
39         -Wclobbered
40         -Wempty-body
41         -Wignored-qualifiers
42         -Wmissing-include-dirs
43         -Woverlength-strings
44         -Wmissing-field-initializers
45         -Wmissing-declarations
46         -Wmissing-prototypes
47         -Wlogical-op
48         -Woverride-init
49         -Wnested-externs
50         -Wredundant-decls
51         -Winvalid-pch
52         -Wdisabled-optimization
53         -Wstack-protector
54         -Waggregate-return
55         -Wcast-align
56         -Wunsafe-loop-optimizations
57         -Wfloat-equal
58         -Wunknown-pragmas
59         -Wunused-function
62 IF (CMAKE_BUILD_TYPE STREQUAL profile)
63         ADD_DEFINITIONS(-g -pg)
64 ENDIF (CMAKE_BUILD_TYPE STREQUAL profile)
66 ENABLE_TESTING()
68 ADD_MANPAGE_TARGET()
70 INCLUDE_DIRECTORIES(.)
72 ADD_SUBDIRECTORY(netsniff-ng)
73 ADD_SUBDIRECTORY(ifpps)
74 ADD_SUBDIRECTORY(trafgen)
75 ADD_SUBDIRECTORY(bpfc)
76 ADD_SUBDIRECTORY(ashunt)
77 ADD_SUBDIRECTORY(curvetun)
78 ADD_SUBDIRECTORY(flowtop)