libpicotcp: Use optimizations if not debug Configure libpicotcp for performance and not debug if our build isn't configured for debug.
diff --git a/libpicotcp/CMakeLists.txt b/libpicotcp/CMakeLists.txt index 9f01af2..f396fe5 100644 --- a/libpicotcp/CMakeLists.txt +++ b/libpicotcp/CMakeLists.txt
@@ -58,6 +58,9 @@ set(C_COMPILER ${CROSS_COMPILER_PREFIX}gcc) endif() + if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + set(perf_flags "\"PERF=1\" \"DEBUG=0\"") + endif() # generate a build.sh script to avoid nasty escape issues, we then invoke this in ExternalProject_Add file( GENERATE @@ -68,6 +71,7 @@ \"PLATFORM_CFLAGS=$<JOIN:${compile_options}, >\" \ \"CROSS_COMPILE=${CROSS_COMPILER_PREFIX}\" \ \"C_COMPILER=${C_COMPILER}\" \ + ${perf_flags} \ make -s -j" )