vcl: add api to retrieve num bytes for tx
[vpp.git] / src / vcl / CMakeLists.txt
index e6d8f98..2f738f3 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+  message(WARNING "-- vppcom is currently only support on Linux - disabled")
+  return()
+endif()
+
 ##############################################################################
 # vppcom shared library
 ##############################################################################
@@ -30,6 +35,11 @@ add_vpp_library(vppcom
   api_headers
 )
 
+option(LDP_HAS_GNU_SOURCE "LDP configured to use _GNU_SOURCE" ON)
+if (LDP_HAS_GNU_SOURCE)
+  add_compile_definitions(HAVE_GNU_SOURCE)
+endif(LDP_HAS_GNU_SOURCE)
+
 add_vpp_library(vcl_ldpreload
   SOURCES
   ldp_socket_wrapper.c
@@ -45,4 +55,4 @@ add_vpp_headers(vcl
   vppcom.h
   vcl_locked.h
   ldp_socket_wrapper.h
-)
\ No newline at end of file
+)