1 # Copyright (c) 2018 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 option(VPP_BUFFER_FAULT_INJECTOR "Include the buffer fault injector" OFF)
16 ##############################################################################
17 # Generate vlib/config.h
18 ##############################################################################
19 if(VPP_BUFFER_FAULT_INJECTOR)
20 set(BUFFER_ALLOC_FAULT_INJECTOR 1 CACHE STRING "fault injector on")
22 set(BUFFER_ALLOC_FAULT_INJECTOR 0 CACHE STRING "fault injector off")
25 set(PRE_DATA_SIZE 128 CACHE STRING "Buffer headroom size.")
27 if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
32 set(VLIB_PROCESS_LOG2_STACK_SIZE
35 STRING "Process node default stack size (log2)"
39 ${CMAKE_SOURCE_DIR}/vlib/config.h.in
40 ${CMAKE_CURRENT_BINARY_DIR}/config.h
43 FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
44 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vlib
48 ##############################################################################
49 # Find lib and include files
50 ##############################################################################
51 message(STATUS "Looking for libuuid")
52 vpp_find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
53 vpp_find_library(UUID_LIB NAMES uuid)
55 if(UUID_INCLUDE_DIR AND UUID_LIB)
56 include_directories(${UUID_INCLUDE_DIR})
57 set(VMBUS_SOURCE linux/vmbus.c)
59 message(STATUS "Found uuid in ${UUID_INCLUDE_DIR}")
61 message(WARNING "-- libuuid not found - vmbus support disabled")
64 ##############################################################################
66 ##############################################################################
154 LINK_LIBRARIES vppinfra svm ${VMBUS_LIBS} ${CMAKE_DL_LIBS}