vlib: refactor trajectory trace debug feature
[vpp.git] / src / CMakeLists.txt
index 3fc72d7..a291c4d 100644 (file)
@@ -141,6 +141,15 @@ if (VPP_ENABLE_SANITIZE_ADDR)
   set(CMAKE_SHARED_LINKER_FLAGS "-fsanitize=address ${CMAKE_SHARED_LINKER_FLAGS}")
 endif (VPP_ENABLE_SANITIZE_ADDR)
 
+##############################################################################
+# trajectory trace
+##############################################################################
+
+option(VPP_ENABLE_TRAJECTORY_TRACE "Build vpp with trajectory tracing enabled" OFF)
+if(VPP_ENABLE_TRAJECTORY_TRACE)
+  set(CMAKE_C_FLAGS "-DVLIB_BUFFER_TRACE_TRAJECTORY=1 ${CMAKE_C_FLAGS}")
+endif()
+
 ##############################################################################
 # install config
 ##############################################################################