X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fcmake%2Flibrary.cmake;h=ad4adfcabc4f034ab8f8f7584d5b68632ef5b9ad;hb=ce1ff6a9b1ab2c4ab74165b26c92c2d551f53cf8;hp=c80d7f226d6adb0803eed6acfb10ee78d81af9b4;hpb=248210c6ca1716ee2c5e6c974051218930fa4c26;p=vpp.git diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake index c80d7f226d6..ad4adfcabc4 100644 --- a/src/cmake/library.cmake +++ b/src/cmake/library.cmake @@ -51,6 +51,9 @@ macro(add_vpp_library lib) target_compile_options (${lib} PRIVATE "-ffunction-sections") target_compile_options (${lib} PRIVATE "-fdata-sections") target_link_libraries (${lib} "-Wl,--gc-sections") + if(compiler_flag_no_stringop_overflow) + target_link_libraries (${lib} "-Wno-stringop-overflow") + endif() endif() if(ARG_MULTIARCH_SOURCES) @@ -77,6 +80,10 @@ macro(add_vpp_library lib) add_dependencies(${lo} api_headers) endif() + if(VPP_EXTERNAL_PROJECT AND ARG_API_FILES) + add_dependencies(${lo} ${lib}_api_headers) + endif() + if(ARG_DEPENDS) add_dependencies(${lo} ${ARG_DEPENDS}) endif()