forked from HBM/devscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
113 lines (87 loc) · 3.17 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
project("hbm_scan_client" CXX)
cmake_minimum_required(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "-std=c++0x" CACHE STRING "" FORCE)
option(WITH_CPPCHECK "CppCheck" OFF)
if(WITH_CPPCHECK)
find_package(cppcheck)
include(CppcheckTargets)
endif()
message(STATUS "-----------------------------------------------------------")
message(STATUS "CppCheck : " ${WITH_CPPCHECK})
message(STATUS "-----------------------------------------------------------")
include_directories(..)
include_directories(../jsoncpp/include)
include_directories(include)
add_subdirectory(../jsoncpp ${PROJECT_BINARY_DIR}/jsoncpp)
enable_testing()
add_subdirectory(test ${PROJECT_BINARY_DIR}/test)
# the library with all client specific stuff
add_subdirectory(lib ${PROJECT_BINARY_DIR}/lib)
###################################################################
## SCANCLIENT_COMPACT
## Receive all announcements for a specified time and print them in
## a compact form
###################################################################
set(SOURCES_SCANCLIENT_COMPACT
scanclientcompact.cpp
)
add_executable( scanclientcompact.bin ${SOURCES_SCANCLIENT_COMPACT} )
if(CPPCHECK_FOUND)
add_cppcheck_sources(scanclientcompact.bin ALL ${SOURCES_SCANCLIENT_COMPACT})
add_xml_cppcheck(scanclientcompact.bin ALL )
endif()
target_link_libraries( scanclientcompact.bin
scanclient-static
jsoncpp_lib
)
###################################################################
## SCANCLIENT_PRINT
## Dump all new, changed and removed announcements until program
## is stopped
###################################################################
set(SOURCES_SCANCLIENT_PRINT
scanclientprint.cpp
)
add_executable( scanclientprint.bin ${SOURCES_SCANCLIENT_PRINT} )
target_link_libraries( scanclientprint.bin
scanclient-static
jsoncpp_lib
)
if(CPPCHECK_FOUND)
add_cppcheck_sources(scanclientprint.bin ALL ${SOURCES_SCANCLIENT_PRINT})
add_xml_cppcheck(scanclientprint.bin)
endif(CPPCHECK_FOUND)
###################################################################
## SCANCLIENT_NOTIFIER
## Notify all new, changed and removed announcements until program
## is stopped
###################################################################
set(SOURCES_SCANCLIENT_NOTIFIER
scanclientnotifier.cpp
)
add_executable( scanclientnotifier.bin ${SOURCES_SCANCLIENT_NOTIFIER} )
target_link_libraries( scanclientnotifier.bin
scanclient-static
jsoncpp_lib
)
if(CPPCHECK_FOUND)
add_cppcheck_sources(scanclientnotifier.bin ALL ${SOURCES_SCANCLIENT_NOTIFIER})
add_xml_cppcheck(scanclientnotifier.bin)
endif(CPPCHECK_FOUND)
###################################################################
## CONFIGUREINTERFACE
## Send network configuration requests via the HBM scan protocol.
## See speicifaction for details.
###################################################################
set(SOURCES_CONFIGUREINTERFACE
configureinterface.cpp
)
add_executable( configureinterface.bin ${SOURCES_CONFIGUREINTERFACE} )
target_link_libraries( configureinterface.bin
scanclient-static
jsoncpp_lib
)
if(CPPCHECK_FOUND)
add_cppcheck_sources(configureinterface.bin ALL ${SOURCES_CONFIGUREINTERFACE})
add_xml_cppcheck(configureinterface.bin)
endif(CPPCHECK_FOUND)