amzn / hawktracer

HawkTracer is a highly portable, low-overhead, configurable profiling tool built in Amazon Video for getting performance metrics from low-end devices.
MIT License
133 stars 31 forks source link

cmake/platform_features.cmake: fix -DENABLE_CPU_USAGE_FEATURE=OFF #86

Closed ffontaine closed 2 years ago

ffontaine commented 2 years ago

Fix -DENABLE_CPU_USAGE_FEATURE=OFF to allow the user to disable CPU_USAGE and avoid the following build failure without threads:

/home/giuliobenetti/autobuild/run/instance-2/output-1/build/hawktracer-e53b07bc812c4cfe8f6253ddb48ac43de8fa74a8/lib/platform/linux/cpu_usage.c:5:10: fatal error: pthread.h: No such file or directory
    5 | #include <pthread.h>
      |          ^~~~~~~~~~~

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

loganek commented 2 years ago

Nice catch, thanks!