Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
e4e666f459
4563 changed files with 1690372 additions and 0 deletions
40
thirdparty/portable-snippets/tests/cmake/FindClockGettime.cmake
vendored
Normal file
40
thirdparty/portable-snippets/tests/cmake/FindClockGettime.cmake
vendored
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue