make picoquic profilable
@@ -9,6 +9,9 @@ SET(CMAKE_C_STANDARD 11)
SET(CMAKE_C_FLAGS "-std=gnu99 -Wall -O2 -g ${CC_WARNING_FLAGS} ${CMAKE_C_FLAGS}")
+SET(GCC_COVERAGE_LINK_FLAGS "-Wl,--no-as-needed,-lprofiler,--as-needed")
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
+
if(${DISABLE_DEBUG_PRINTF})
SET(CMAKE_C_FLAGS "-DDISABLE_DEBUG_PRINTF ${CMAKE_C_FLAGS}")
endif()
