Initial import of libdpf.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 14:08:32 -06:00
commit e4e666f459
4563 changed files with 1690372 additions and 0 deletions

View file

@ -0,0 +1,40 @@
include (CheckFunctionExists)
set(ClockGettime_LIBRARIES "")
set(ClockGettime_FOUND 0)
mark_as_advanced(ClockGettime_LIBRARIES CLOCK_GETTIME_FOUND)
set(CMAKE_REQUIRED_LIBRARIES_orig "${CMAKE_REQUIRED_LIBRARIES}")
set(CMAKE_REQUIRED_LIBRARIES "")
check_function_exists(clock_gettime ClockGettime_LIBC)
if(ClockGettime_LIBC)
set(ClockGettime_LIBRARIES "")
set(ClockGettime_FOUND 1)
else()
set(CMAKE_REQUIRED_LIBRARIES rt)
check_function_exists(clock_gettime ClockGettime_LIBRT)
if(ClockGettime_LIBRT)
set(ClockGettime_LIBRARIES rt)
set(ClockGettime_FOUND 1)
else()
# mingw puts clock_gettime in pthreads
set(CMAKE_REQUIRED_LIBRARIES pthread)
check_function_exists(clock_gettime ClockGettime_LIBPTHREAD)
if(ClockGettime_LIBPTHREAD)
set(ClockGettime_LIBRARIES pthread)
set(ClockGettime_FOUND 1)
endif()
unset(ClockGettime_LIBPTHREAD)
endif()
unset(ClockGettime_LIBRT)
endif()
unset(ClockGettime_LIBC)
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_orig}")
unset(CMAKE_REQUIRED_LIBRARIES_orig)