From 18561adfde80d6665e24262d70d18f916e2662e5 Mon Sep 17 00:00:00 2001 From: YohanPipereau Date: Mon, 15 Jul 2019 15:37:46 +0200 Subject: vom: migration from scvpp to vom Change-Id: I79609f0bee9b8307da0d9bf704babe8ba06dba4d Signed-off-by: YohanPipereau Co-authored-by: Pavel Kotucek Co-authored-by: Andrej Kozemcak --- src/plugins/CMakeLists.txt | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src/plugins/CMakeLists.txt') diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 6a04143..ae1c58d 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -13,7 +13,6 @@ # limitations under the License. cmake_minimum_required(VERSION 3.0) -project(sysrepo-vpp-plugins) # DEPENDENCIES ############## @@ -26,8 +25,8 @@ find_package(VPP) #use FindVPP.cmake find_package(PkgConfig) #official cmake module pkg_check_modules(SYSREPO REQUIRED libsysrepo) #PkgConfig cmake module maccro -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../scvpp scvpp_out) -include_directories(${CMAKE_CURRENT_LIST_DIR}/../scvpp/inc) +find_package(Boost 1.40 COMPONENTS program_options REQUIRED) +include_directories(${Boost_INCLUDE_DIR}) # get sysrepo plugins directory from pkgconfig if (NOT SR_PLUGINS_DIR) @@ -47,11 +46,11 @@ endif() set(CMAKE_EXPORT_COMPILE_COMMANDS 1) # set compiler and linker flags -set(RIGOROUS_C_FLAGS "-Wlogical-op -Wformat=2") -set(CMAKE_C_FLAGS "-Wall -Wextra -std=gnu99 ${RIGOROUS_C_FLAGS}") -set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -std=gnu99 -g -O0 ${RIGOROUS_C_FLAGS}") +set(RIGOROUS_CXX_FLAGS "-Wlogical-op -Wformat=2") +set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=gnu++11 ${RIGOROUS_CXX_FLAGS}") +set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -std=gnu++11 -g -O0 ${RIGOROUS_CXX_FLAGS}") #NDEBUG to skip assert checks -set(CMAKE_C_FLAGS_RELEASE "-Wall -Wextra -std=gnu99 -DNDEBUG -O2 ${RIGOROUS_C_FLAGS}") +set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wextra -std=gnu++11 -DNDEBUG -O2 ${RIGOROUS_CXX_FLAGS}") # add plugin include directories include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -60,18 +59,22 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) set(PLUGINS_SOURCES sc_init.c sc_plugins.c - ietf/ietf_interface.c - ietf/ietf_nat.c - openconfig/openconfig_interfaces.c - openconfig/openconfig_local_routing.c + sys_util.cpp + vpp-oper/interface.cpp + ietf/ietf_interface.cpp + openconfig/openconfig_interfaces.cpp + ietf/ietf_nat.cpp ) +set_source_files_properties(${PLUGINS_SOURCES} PROPERTIES LANGUAGE CXX) + # build the source code into shared library -add_library(vpp-plugins SHARED ${PLUGINS_SOURCES}) -target_link_libraries(vpp-plugins ${SYSREPO_LIBRARIES} scvpp) +add_library(sweetcomb SHARED ${PLUGINS_SOURCES}) +target_link_libraries(sweetcomb ${SYSREPO_LIBRARIES} ${Boost_LIBRARIES} + ${VOM_LIBRARY}) # INSTALL ######### # install the plugin into plugins dir -install(TARGETS vpp-plugins DESTINATION ${SR_PLUGINS_DIR}) +install(TARGETS sweetcomb DESTINATION ${SR_PLUGINS_DIR}) -- cgit 1.2.3-korg