-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
61 lines (54 loc) · 1.92 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
#
# PFPSim: Library for the Programmable Forwarding Plane Simulation Framework
#
# Copyright (C) 2016 Concordia Univ., Montreal
# Samar Abdi
# Umair Aftab
# Gordon Bailey
# Faras Dewal
# Shafigh Parsazad
# Eric Tremblay
#
# Copyright (C) 2016 Ericsson
# Bochra Boughzala
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
project(pfpsim)
cmake_minimum_required(VERSION 2.8.7)
#--------------OPTION FLAGS------------------------------------------------
option(PFPSIM "PFPSIM" ON) # cmake -DPFPSIMCORE=ON|OFF
option(PFP-P4 "PFP-P4" ON) #cmake -DPFP-P4=ON|OFF
#--------------Add Subdirectories------------------------------------------------
if("${PFP-P4}" MATCHES "ON")
message (STATUS "Install PFP-P4? Yes")
add_subdirectory(pfp-p4)
else ()
message (STATUS "Install PFP-P4? No")
endif()
if("${PFPSIM}" MATCHES "ON")
message (STATUS "Install PFPSIM? Yes")
add_subdirectory(pfpsim)
else ()
message (STATUS "Install PFPSIM? No")
endif()
#------------------------ uninstall target -----------------
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)